Page 1 of 2

newbie min cmd window?

Posted: 22 Feb 2019 13:03
by Nicodemus
how do I run the cmd window hidden or min?

Code: Select all

@echo off
"E:\12noon Display Changer\dc64.exe" -width=1176 -height=664 /c "E:\LaunchBox\Games\Big Fish Games\Mystery Case Files - Return to Ravenhearst FINAL\ReturnToRavenhearst.exe"
im running a game at a custom resolution with Display Changer, however the cmd window is visible behind it?
thanks for your help

Re: newbie min cmd window?

Posted: 22 Feb 2019 13:08
by Squashman

Code: Select all

@echo off
start "My Game" "E:\12noon Display Changer\dc64.exe" -width=1176 -height=664 /c "E:\LaunchBox\Games\Big Fish Games\Mystery Case Files - Return to Ravenhearst FINAL\ReturnToRavenhearst.exe"

Re: newbie min cmd window?

Posted: 22 Feb 2019 15:32
by Nicodemus
Thank you VERY much! one last question. Can I add a .exe program to start the same time? I have a program called Blackie that will black out everything in the background.
im trying to get the game to play in windowed mode but with a black background and not the desktop.
im running Desktop Changer to switch the resolution, then running the game, then running Blackie to black out the desktop.

Re: newbie min cmd window?

Posted: 22 Feb 2019 15:59
by Squashman
I am not going to make assumptions on what code you are using to accomplish your task. It is pointless to ask a question if you haven't already tried some code to solve the task.

Try to code it yourself. If it doesn't work, come back and post the code you are trying to use and explain in full detail what you are trying to accomplish.

Re: newbie min cmd window?

Posted: 22 Feb 2019 16:30
by Nicodemus
thank you

@echo off

start "my game" "E:\12noon Display Changer\dc64.exe" -width=1280 -height=720 /c "E:\LaunchBox\Games\Big Fish Games\Mystery Case Files - Return to Ravenhearst FINAL\ReturnToRavenhearst.exe"

"E:\LaunchBox\Games\Big Fish Games\Launchers\Blackie.exe"

taskkill /IM ReturnToRavenhearst.exe

when ReturnToRavenhearst.exe closes I want Blackie.exe to close with it. sorry, im 13 and still learning this.

Re: newbie min cmd window?

Posted: 22 Feb 2019 17:14
by Ed Dyreen
This may work, in the worst case the script will respond after 9 pings, script requires system to have a network driver installed or it will clog the CPU.

Code: Select all

@echo off

start "my game" "E:\12noon Display Changer\dc64.exe" -width=1280 -height=720 /c "E:\LaunchBox\Games\Big Fish Games\Mystery Case Files - Return to Ravenhearst FINAL\ReturnToRavenhearst.exe"

start "" "E:\LaunchBox\Games\Big Fish Games\Launchers\Blackie.exe"

for /L %%i in () do (

	for /L %%i in (1,1,9) do 2>nul>&1 ping;
	
	2>nul>&1 taskList /NH /FI "imagename EQ ReturnToRavenhearst.exe" ||(

		taskkill /IM Blackie.exe
		exit 0
	)
)
If possible to start ReturnToRavenhearst.exe after blackie.exe then the coding can be simple.

Code: Select all

@echo off

start "" "E:\LaunchBox\Games\Big Fish Games\Launchers\Blackie.exe"

start "my game" /WAIT "E:\12noon Display Changer\dc64.exe" -width=1280 -height=720 /c "E:\LaunchBox\Games\Big Fish Games\Mystery Case Files - Return to Ravenhearst FINAL\ReturnToRavenhearst.exe"

taskkill /IM Blackie.exe

exit 0

Re: newbie min cmd window?

Posted: 22 Feb 2019 17:41
by Nicodemus
omg! the 2nd script worked. I see what I was doing wrong. thank you

Re: newbie min cmd window?

Posted: 22 Feb 2019 18:45
by Squashman
But I thought the problem was you didn't want the cmd window open in the background. I don't see how this solves that.

Re: newbie min cmd window?

Posted: 22 Feb 2019 19:23
by Nicodemus
your right it doesn't. but im still trying different things.

Re: newbie min cmd window?

Posted: 22 Feb 2019 19:38
by Ed Dyreen
Nicodemus wrote:
22 Feb 2019 19:23
your right it doesn't. but im still trying different things.
my mistake :)

startMinimized.CMD

Code: Select all

start "" /MIN "startGame.CMD"
startGame.CMD will start minimized in there you put the actual code.
Nicodemus wrote:
22 Feb 2019 19:23
omg! the 2nd script worked. I see what I was doing wrong. thank you
I tested the first script on my pc, but I can't reproduce the problem "not works" :|

Re: newbie min cmd window?

Posted: 22 Feb 2019 20:20
by Nicodemus
like this?
@echo off

start "" /MIN "startGame.CMD"@echo off

start "" "E:\LaunchBox\Games\Big Fish Games\Launchers\Blackie.exe"

start "" /WAIT "E:\12noon Display Changer\dc64.exe" -width=1280 -height=720 /c "E:\LaunchBox\Games\Big Fish Games\Mystery Case Files - Return to Ravenhearst FINAL\ReturnToRavenhearst.exe"

taskkill /IM Blackie.exe

exit 0

Re: newbie min cmd window?

Posted: 22 Feb 2019 21:30
by Ed Dyreen
Eh no, more like in 2 separate files

startMinimized.CMD

Code: Select all

start "" /MIN "startGame.CMD"
startGame.CMD

Code: Select all

@echo off
start "" "E:\LaunchBox\Games\Big Fish Games\Launchers\Blackie.exe"
start "my game" /WAIT "E:\12noon Display Changer\dc64.exe" -width=1280 -height=720 /c "E:\LaunchBox\Games\Big Fish Games\Mystery Case Files - Return to Ravenhearst FINAL\ReturnToRavenhearst.exe"
taskkill /IM Blackie.exe
exit 0
And then run startMinimized.CMD

Re: newbie min cmd window?

Posted: 23 Feb 2019 07:05
by Nicodemus
thank you. I want to understand. I can use one cmd file to run another? also, they have to be separate files? thank you everyone for your help, I learned a lot. :D

Re: newbie min cmd window?

Posted: 23 Feb 2019 07:27
by Ed Dyreen
Nicodemus wrote:
23 Feb 2019 07:05
thank you. I want to understand. I can use one cmd file to run another? also, they have to be separate files? thank you everyone for your help, I learned a lot. :D
No they don't, actually I've been thinking a bit about your question because I was wondering if you preferred only a single batch.

Re: newbie min cmd window?

Posted: 23 Feb 2019 08:42
by Nicodemus
thank you for your help. this works so im happy but I want to learn. how would I make it into a single batch file?