Question : changing CMD prompt window properties in batch

I want to run a command script on a remote computer using rclient from the windows resource kit.
It works fine using: rclient {remoteHost} /L:{remoteHost}\{remoteUser} /B {remoteBatch}

Here's the problem:

The output of {remoteBatch} should be on a CMD window with size 150x50.
Resizing the CMD window on my local computer does not work as "/B {remoteBatch}" starts a new command shell on the remote host and this has the regular 80x24 size.
I also tried to call a wrapper to remoteBatch on the remote system which in turn calls a link to the actual remote batch. The wrapper just contains the statement "start {remoteBatch}.lnk"
I created the link on the remote machine and changed the properties to a different size but all I get is the remotes hosts default CMD window size (which is not 80x24, because I changed it to 80x50).
I could change the default CMD window size on the remote computer to 150x50 to solve the problem but then every CMD prompt opened locally on remote would have this size which is rather annoying.
Also I do not like the awkward solution with a batch which calls a link which starts a batch.

Is there any solution to change the size of a CMD window just for one job?
I would even go as far and change registry settings and set them back to their original state at the end of my batch.

Answer : changing CMD prompt window properties in batch

Try "mode con cols=xxx lines=yyyy" in your batch script.
That will change it for the current session
Random Solutions  
 
programming4us programming4us