Chris Miller
asked on
CMD window size and position
How do I specify within my batch file the size and position of the cmd window.
I would like it to be 1" x 2" and in the upper left corner.
I would like it to be 1" x 2" and in the upper left corner.
Never seen a way to specify the cmd window from within itself. In addition, keep in mind that what's 1 inch on your screen could be 3/4 of 1 1/2 inches on someone elses, depending on the resolution used. If there is a way I'm not aware of, you'll need to specify pixel size which could vary on workstations.
ASKER
How would I specify the pixel size?
Like I said:
> If there is a way I'm not aware of, you'll need to specify pixel size
> which could vary on workstations.
Probably should have said this instead:
> If there is a way I'm not aware of, you would likely need to specify
> pixel size which could vary on workstations.
> If there is a way I'm not aware of, you'll need to specify pixel size
> which could vary on workstations.
Probably should have said this instead:
> If there is a way I'm not aware of, you would likely need to specify
> pixel size which could vary on workstations.
ASKER
any ideas on a script that will create a small text window.
ex:
************************** *******
@echo off
color 48
echo Installing KB893086
@echo off
kb893086-xp.exe /quiet /norestart /overwriteoem /nobackup
exit
************************** *******
Have something pop up that has information in it
"Installing KB893086"
ex:
**************************
@echo off
color 48
echo Installing KB893086
@echo off
kb893086-xp.exe /quiet /norestart /overwriteoem /nobackup
exit
**************************
Have something pop up that has information in it
"Installing KB893086"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or just add
NET SEND %computername% Installing KB893086
NET SEND %computername% Installing KB893086
You can specify the size +position of your standard cmd windows (this is from Win2000, german - so possible translation errors :)):
- open a cmd window through a shortcut (i.e. drag cmd.exe from the windows folder onto the desktop, choose "create shortcut")
- click in the command box (where the black c:\ is, top left corner), choose "properties"
- tab Font: changing the font size changes the window size, i.e. try 4x6
- tab Layout: change the position to 20, 20 (or whatever you want)
- Save with "OK" - it will ask you if the changes are only for this window or all windows opened by the same shortcut, choose the second.
Done :)
As for windows / popups -- remember that these DO NOT close by themselves. If you want them shut afterwards, you will either need to hack (i.e. programmatically select the window and use SendKeys) or make a program wrapper for all of this (opening and closing windows).
- open a cmd window through a shortcut (i.e. drag cmd.exe from the windows folder onto the desktop, choose "create shortcut")
- click in the command box (where the black c:\ is, top left corner), choose "properties"
- tab Font: changing the font size changes the window size, i.e. try 4x6
- tab Layout: change the position to 20, 20 (or whatever you want)
- Save with "OK" - it will ask you if the changes are only for this window or all windows opened by the same shortcut, choose the second.
Done :)
As for windows / popups -- remember that these DO NOT close by themselves. If you want them shut afterwards, you will either need to hack (i.e. programmatically select the window and use SendKeys) or make a program wrapper for all of this (opening and closing windows).
adding to spiderfix's solution:
in your batch file, you can use this as a shortcut:
echo msgbox "Installing KB893086" >%temp%\KB893086.vbs &%temp%\KB893086.vbs