0

When i run this batch file command as a single batch file the second command does not run.However when i run them as individual batch file commands they work fine.

"C:\Program Files\Mozilla Firefox\firefox.exe" -P "america" -no-remote http://hakikahost.com/error.html
"nircmd.exe" win hide process "firefox.exe"

tried creating 1 single batch file which called with a call the two batch files now having separated the batch files command separately like this

call test.bat
call hide.bat

where test.bat contained the first command and hide.bat contained the second command but it still didnt work.What am i doing wrong?

2 Answers 2

1

It may be that firefox.exe never returns until you close the window. Try using start to launch the applications, as start will return as soon as the application has launched.

start "" "C:\Program Files\Mozilla Firefox\firefox.exe" -P "america" -no-remote http://hakikahost.com/error.html
start "" "nircmd.exe" win hide process "firefox.exe"
Sign up to request clarification or add additional context in comments.

Comments

1

The first command, "C:\Program Files\Mozilla Firefox\firefox.exe" does not return until the Fx session has ended (ie you EXIT from it)

Then there are no Fx executables so the second command can't hide the process that doesn't exist.

Try

START "" "C:\Program Files\Mozilla Firefox\firefox.exe" -P "america" -no-remote http://hakikahost.com error.html
"nircmd.exe" win hide process "firefox.exe"

The only difference is the START "" before the firefox-invocation. Note that the empty-quoted-string is required - you could enter a string between the quotes if you like - this becomes the window title.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.