starting several programs at once

bwanaaa

Senior member
Dec 26, 2002
739
1
81
I have a batch file that sort of does this:

start "" "C:\Users\Admin\Downloads\monitor\RealTemp\RealTempGT.exe"
start "" "C:\Program Files (x86)\GPU-Z\GPU-Z.exe"
start "" "C:\Program Files (x86)\EVGA\ELeetX\ELeetX_x64.exe"

The space after the start command ensures that the command window disappears after the program starts.

All these programs need to run as admin. I get the confirmation dialog for each of them in turn. Except the dialog for the last program is obscured by the command window.
I have to click the flashing shield at the taskbar to bring the dialog to the front and then acknowledge that dialog before the command window disappears.

I cannot figure out how to skip the confirmation dialogs. Help?

As an added bonus, I thought it might be nice to stop all these apps at once. or even one at a time.
But these do nothing
taskkill /F RealTempGT.exe
taskkill /F /IM RealTempGT.exe
taskkill /F /IM "C:\Users\Stefan\Downloads\monitor\RealTemp\RealTempGT.exe"



OMG! the editor thought the colon backslash was a smiley!!
 

Ketchup

Elite Member
Sep 1, 2002
14,559
248
106
Can't you just go into User Accounts and unselect User Account Control (UAC)?
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
http://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/

Make the batch file a two-stepper:
stepone.bat: elevate.exe steptwo.bat
steptwo.bat: your current batch file

Then, they will all have started from a parent process that had been given admin rights, regardless of valid user names (bringing up the normal UAC prompt, allowing any admin credentials, is what differentiates it from runas). You should be able to do the same for the taskkill setup.
 

bwanaaa

Senior member
Dec 26, 2002
739
1
81
@stlcardinals
works nice but how do i made the command window go away?
There is one that says:

Code:
=============================
Running Admin shell
=============================
C:\Windows\system32>




@Cerb
tnx for the elevate command.

It successfully starts realtemp and gpu-z. However, it gives an error dialog. For example, when my startbat2.exe is:
Code:
start "" "C:\Program Files (x86)\EVGA\ELeetX\ELeetX_x64.exe"
start "" "C:\Users\Admin\Downloads\monitor\RealTemp\RealTempGT.exe"
start "" "C:\Program Files (x86)\GPU-Z\GPU-Z.exe"

The EVGA utility and GPU-z open fine but real temp does not.
I get an error dialog that says
Driver not loaded. Try Run as Administrator.

I get the same error when the order of the files in startbat2.exe is
Code:
start "" "C:\Program Files (x86)\GPU-Z\GPU-Z.exe"
start "" "C:\Program Files (x86)\EVGA\ELeetX\ELeetX_x64.exe"
start "" "C:\Users\Admin\Downloads\monitor\RealTemp\RealTempGT.exe"

When I change the order around so the startbat2.exe is
Code:
start "" "C:\Users\Admin\Downloads\monitor\RealTemp\RealTempGT.exe"
start "" "C:\Program Files (x86)\GPU-Z\GPU-Z.exe"
start "" "C:\Program Files (x86)\EVGA\ELeetX\ELeetX_x64.exe"

Realtemp and GPU-z open fine but ELEET EVGA does not. I get an error dialog that says
Error Ring0::Open()!!

I get the same error with this order:
Code:
start "" "C:\Users\Admin\Downloads\monitor\RealTemp\RealTempGT.exe"
start "" "C:\Program Files (x86)\EVGA\ELeetX\ELeetX_x64.exe"
start "" "C:\Program Files (x86)\GPU-Z\GPU-Z.exe"
and this order
Code:
start "" "C:\Program Files (x86)\EVGA\ELeetX\ELeetX_x64.exe"
start "" "C:\Users\Admin\Downloads\monitor\RealTemp\RealTempGT.exe"
start "" "C:\Program Files (x86)\GPU-Z\GPU-Z.exe"
and this order
Code:
start "" "C:\Users\Admin\Downloads\monitor\RealTemp\RealTempGT.exe"
start "" "C:\Program Files (x86)\GPU-Z\GPU-Z.exe"
start "" "C:\Program Files (x86)\EVGA\ELeetX\ELeetX_x64.exe"
Weird and beyond my understanding.
 
Last edited:

bwanaaa

Senior member
Dec 26, 2002
739
1
81
one more thing:

is there any way to specify where the windows will open on the desktop? in other words, is there a batch command that will cascade windows?

I found this (it's a vbs script)
http://blogs.technet.com/b/heyscrip...ow-can-i-tile-the-windows-on-the-desktop.aspx

but it just tiles 9 command windows on the desktop.weird.

then i found this (a javascript? that runs in windows?? and is 7 years old???)
http://www.911cd.net/forums//index.php?showtopic=15755

but it only tiles browser windows, not application windows.
 

bwanaaa

Senior member
Dec 26, 2002
739
1
81
unfortunately that does not close the window.

but this did
taskkill /F /IM cmd.exe
 

sm625

Diamond Member
May 6, 2011
8,172
137
106
one more thing:
is there any way to specify where the windows will open on the desktop? in other words, is there a batch command that will cascade windows?


Make an autohotkey script with the follwing single line:

WinMove,A,,100,100,1366,884

Then compile the script into a .exe and then call that .exe right after you open the program.
 

jkauff

Senior member
Oct 4, 2012
583
13
81
I would recommend Windows Task Scheduler over a batch file. Much more configurable, and you can give tasks Administrator privileges. That's what I use to launch all my stubborn programs (like Powerpro) at startup.