Jump to content

batch file

Flawizz

sorry if this topic is in the wrong place

i currently have a batch file that opens msi afterburner, then opens msi command center and then it opens steelseries engine 3, the cmd box does not close after the 3 programs loaded, and when i close the cmd box, steelseries engine 3 closes with it, heres the script: 

 

start "Steelseries Engine" "C:\Program Files\SteelSeries\SteelSeries Engine 3\SteelSeriesEngine3Client.exe"
start "MSI Afterburner" "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe"
Start "MSI Command center" "C:\Program Files (x86)\MSI\Command Center\CC_LoadingPage.exe"


 

what im trying to fix is that the cmd box closes after all programs are loaded

can someone help plz :D

Link to comment
Share on other sites

Link to post
Share on other sites

You should be able to execute the program by just specifying it in it's path but let me verify this. Using start starts a new instance of CMD and each of those instances are waiting for the program to finish before moving to the next execution (which doesn't exist) so then CMD closes.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Windows7ge said:

You should be able to execute the program by just specifying it in it's path but let me verify this. Using start starts a new instance of CMD and each of those instances are waiting for the program to finish before moving to the next execution (which doesn't exist) so then CMD closes.

so how can i fix it? without the start?

like this ?

"Steelseries Engine" "C:\Program Files\SteelSeries\SteelSeries Engine 3\SteelSeriesEngine3Client.exe"

"MSI Afterburner" "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe"

"MSI Command center" "C:\Program Files (x86)\MSI\Command Center\CC_LoadingPage.exe"

 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Flawizz said:

so how can i fix it? without the start?

like this ?

"Steelseries Engine" "C:\Program Files\SteelSeries\SteelSeries Engine 3\SteelSeriesEngine3Client.exe"

"MSI Afterburner" "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe"

"MSI Command center" "C:\Program Files (x86)\MSI\Command Center\CC_LoadingPage.exe"

 

Found something for you. I've had to use something similar when launching CMD within a C# coded application:

cmd /c start C:\path\to\program\executable.exe

/c tells CMD to close the CMD window. /k will keep it open.

 

Think of them like this:

/close

/keep

 

Do note if you're executing files inside Program Files or Program Files x86 you have to encapsulate them in quotes:

cmd /c start C:\"program files x86"\"the program"\the_exe.exe

 

In years past I use to play around with batch files and spent a long time figuring out how to do this. You should be able to list your programs and it will launch then close each CMD instance.

Link to comment
Share on other sites

Link to post
Share on other sites

So for you it would look similar to this.

cmd /c start C:\"Program Files"\SteelSeries\"SteelSeries Engine 3"\SteelSeriesEngine3Client.exe"
cmd /c start C:\"Program Files (x86)"\"MSI Afterburner"\MSIAfterburner.exe"
cmd /c start C:\"Program Files (x86)"\MSI\"Command Center"\CC_LoadingPage.exe"

You may also be able to add the line "pause" at the bottom. If there's an error this will keep the primary CMD instance open so you can read it. Then you can remove it at your leisure.

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, Windows7ge said:

So for you it would look similar to this.


cmd /c start C:\"Program Files"\SteelSeries\"SteelSeries Engine 3"\SteelSeriesEngine3Client.exe"
cmd /c start C:\"Program Files (x86)"\"MSI Afterburner"\MSIAfterburner.exe"
cmd /c start C:\"Program Files (x86)"\MSI\"Command Center"\CC_LoadingPage.exe"

You may also be able to add the line "pause" at the bottom. If there's an error this will keep the primary CMD instance open so you can read it. Then you can remove it at your leisure.

ill try when i get home, thanks in advance ! :D❤️

Link to comment
Share on other sites

Link to post
Share on other sites

42 minutes ago, Flawizz said:

sorry if this topic is in the wrong place

i currently have a batch file that opens msi afterburner, then opens msi command center and then it opens steelseries engine 3, the cmd box does not close after the 3 programs loaded, and when i close the cmd box, steelseries engine 3 closes with it, heres the script: 

 

start "Steelseries Engine" "C:\Program Files\SteelSeries\SteelSeries Engine 3\SteelSeriesEngine3Client.exe"
start "MSI Afterburner" "C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe"
Start "MSI Command center" "C:\Program Files (x86)\MSI\Command Center\CC_LoadingPage.exe"
 

what im trying to fix is that the cmd box closes after all programs are loaded

can someone help plz :D

Its been a while, but would adding the line 'echo off' work?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, steelo said:

Its been a while, but would adding the line 'echo off' work?

tried it before, had no effect that i could see, ty tho :)

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Flawizz said:

tried it before, had no effect that i could see, ty tho :)

Okay, sorry...It's been a good couple of years since I've messed with .bat files ?

 

Link to comment
Share on other sites

Link to post
Share on other sites

24 minutes ago, Flawizz said:

ill try when i get home, thanks in advance ! :D❤️

damn, it worked like a charm, thank you ?❤️

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×