i want to change position of batch file window. how?
Moderator: DosItHelp
-
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
- Contact:
i want to change position of batch file window. how?
i want to change position of batch file window. how?
Re: i want to change position of batch file window. how?
'
Would u use an external app
http://www.dostips.com/forum/search.php?keywords=cmdow&terms=all&author=&sc=1&sf=all&sk=t&sd=d&sr=posts&st=0&ch=300&t=0&submit=Search
Would u use an external app
http://www.dostips.com/forum/search.php?keywords=cmdow&terms=all&author=&sc=1&sf=all&sk=t&sd=d&sr=posts&st=0&ch=300&t=0&submit=Search
Code: Select all
for help:
cmdow /?
move example:
cmdow @ /mov 100 100
-
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
- Contact:
Re: i want to change position of batch file window. how?
is it possible without installing any app?
Re: i want to change position of batch file window. how?
At invocation it's sort of possible. It's not a good solution....
Code: Select all
@echo off
set title=somewindowtitle
set xpos=150
set ypos=150
set /a "pos=(ypos << 16) + xpos"
if not "%~1"=="%title%" (
>nul reg add "hkcu\console\%title%" /v WindowPosition /t REG_DWORD /d "%pos%" /f
start "%title%" cmd /c "%~f0 %title%"
goto :eof
)
reg delete "hkcu\console\%title%"
pause
-
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
- Contact:
Re: i want to change position of batch file window. how?
it did not work for me
Re: i want to change position of batch file window. how?
Mohammad_Dos wrote:it did not work for me
Try this. Maybe it is simpler to follow.
It creates file.bat that shows hello world.
Run the batchfile with "remove" as %1 to restore the registry setting to how it was.
Code: Select all
@echo off
set title=My Dos Window
if /i "%~1"=="remove" (
reg delete "hkcu\console\%title%"
goto :EOF
)
set xpos=150
set ypos=150
set /a "pos=(ypos << 16) + xpos"
>nul reg add "hkcu\console\%title%" /v WindowPosition /t REG_DWORD /d "%pos%" /f
>file.bat echo.@echo off
>>file.bat echo.echo Hello World
>>file.bat echo pause
start "%title%" cmd /c "file.bat"
-
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
- Contact:
Re: i want to change position of batch file window. how?
thank u. worked
is not exists any way to change position of the same batch file witch is already running?
is not exists any way to change position of the same batch file witch is already running?
Re: i want to change position of batch file window. how?
If you explain why you need to do that then maybe there is a workaround.
For instance you can change the default properties of cmd or just the batch file you are running, to open at a particular location with a certain font size, colour etc etc.
Right click on the title bar to change those properties.
For instance you can change the default properties of cmd or just the batch file you are running, to open at a particular location with a certain font size, colour etc etc.
Right click on the title bar to change those properties.
Re: i want to change position of batch file window. how?
had a similar ?, can u make it full screen?
-
- Posts: 7
- Joined: 20 Feb 2012 08:14
- Location: Behind you
- Contact:
Re: i want to change position of batch file window. how?
storm97 wrote:had a similar ?, can u make it full screen?
On windows 7, the full-screen option for batch/cms windows is not present in the registry, and is therefore impossible to do.
On vista and below, pressing alt+enter will make the cmd window full screen.