Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Specify window location in a batch file?

6,598 views
Skip to first unread message

Jon Danniken

unread,
Nov 4, 2005, 12:58:36 AM11/4/05
to
Hello,

I have a little batch file that opens up two applications. Is there any way
to specify in the batch file the location of the applications on the screen?

Thanks for any suggestions,

Jon

foxidrive

unread,
Nov 4, 2005, 1:37:01 AM11/4/05
to

Untested:

Create shortcuts to the files and adjust the screen position within the
shortcut. Then start the links.

Jon Danniken

unread,
Nov 4, 2005, 2:22:07 AM11/4/05
to

Thanks, Foxi, but I can't see any way to specify in a Windows shortcut the
screen position. There is a "Normal/Minimize/Maximized" option, but no
screen position option.

For some background on what I am trying to do here, I have a batch file set
to open up "sndvol32" and "sndvol32 -r". This opens up the Windows Volume
Control and the Recording Control applications.

Because the Recording Control application is a function of the Volume
Control application (the "-R" switch of SndVol32), it opens up on top of the
Volume Control, instead of in it's last position. Hence my desire for a way
to specify it's screen position.

Jon

foxidrive

unread,
Nov 4, 2005, 3:31:45 AM11/4/05
to
On Thu, 3 Nov 2005 23:22:07 -0800, Jon Danniken wrote:

> "foxidrive" wrote:
>> On Thu, 3 Nov 2005 21:58:36 -0800, Jon Danniken wrote:
>>
>>> Hello,
>>>
>>> I have a little batch file that opens up two applications. Is there any way
>>> to specify in the batch file the location of the applications on the screen?
>

> Thanks, Foxi, but I can't see any way to specify in a Windows shortcut the
> screen position. There is a "Normal/Minimize/Maximized" option, but no
> screen position option.

Yes, I see the problem.



> For some background on what I am trying to do here, I have a batch file set
> to open up "sndvol32" and "sndvol32 -r". This opens up the Windows Volume
> Control and the Recording Control applications.
>
> Because the Recording Control application is a function of the Volume
> Control application (the "-R" switch of SndVol32), it opens up on top of the
> Volume Control, instead of in it's last position. Hence my desire for a way
> to specify it's screen position.
>
> Jon

CMDOW Commandline Window Utility can help you move or resize the window, a
remarkably useful and also a free tool.

http://commandline.co.uk/

@echo off
start "" SndVol32
start "" SndVol32 /r
ping -n 3 127.0.0.1 >nul
set w=
for /f "tokens=1" %%a in ('cmdow /t^|find /i "sndvol32"') do call :next %%a
set w=
goto :EOF
:next
if not defined w cmdow %1 /mov 0 0
if defined w cmdow %1 /mov 0 400
set w=done

Mark V

unread,
Nov 4, 2005, 4:03:06 PM11/4/05
to

Not natively. You need a utiltiy such as CMDOW
http://www.commandline.co.uk/cmdow/index.html
Recommended and rather useful. <G> (thanks Ritchie)

Todd Vargo

unread,
Nov 4, 2005, 5:47:30 PM11/4/05
to
"Jon Danniken" wrote:
> For some background on what I am trying to do here, I have a batch file
> set to open up "sndvol32" and "sndvol32 -r". This opens up the Windows
> Volume Control and the Recording Control applications.
>
> Because the Recording Control application is a function of the Volume
> Control application (the "-R" switch of SndVol32), it opens up on top of
> the Volume Control, instead of in it's last position. Hence my desire
> for a way to specify it's screen position.

The following batch works for me in Windows 98. The registry key may vary
on your system. Modify to suit your needs.

@echo off
set key=[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\
set key=%key%Applets\Volume Control\Crystal SoundFusion(tm)]
echo> tmp.reg REGEDIT4
echo>>tmp.reg %key%
echo>>tmp.reg "X"=dword:00000000
echo>>tmp.reg "Y"=dword:00000000
start /wait regedit /s tmp.reg
SndVol32
echo>>tmp.reg "Y"=dword:0000011c
start /wait regedit /s tmp.reg
SndVol32 -r


--
Todd Vargo (double "L" to reply by email)

Todd Vargo

unread,
Nov 4, 2005, 5:52:47 PM11/4/05
to

"Todd Vargo" <todd...@alvantage.com> wrote in message
news:dkgoph$j9v$1...@domitilla.aioe.org...

You may want to add a DEL command here to remove the tmp.reg file.

gamerp...@gmail.com

unread,
Feb 15, 2018, 4:35:11 PM2/15/18
to
Yes
0 new messages