Jump to content
Welcome to our new Citrix community!
  • 0

Publishing a batch file to open and application




I'm not very good at making batch files but I need to create 1 to run 2 applications with the last one 10 seconds after the first one (don't ask why).


Here I'm using Word and Excel to test with, thing is I see the batch file show with the timeout command, can I hide the batch file completely?


@echo off

C:\Windows\System32\cmd.exe /c START winword.exe /s

timeout /t 20&&rundll32.exe powrprof.dll,SetSuspendState Sleep

C:\Windows\System32\cmd.exe /c START excel.exe /s



Link to comment

2 answers to this question

Recommended Posts

  • 1

I don't think there is really a good way...


If I were doing this, I'd probably put it into powershell and call powershell.exe with the parameter to minimize it.  Or even vbscript would work -- you can call the vbscript with wscript and it will not show any output.


You would have to translate your script though....  


If you want to stay with batch, there isn't a way to hide the batch file.  You would have to call a batch file that minimized another batch file running.  It's kind of a chicken and egg scenario.  Once you're in the batch file, you could use the /MIN on the start command, but you can't do that until you're actually in a batch file.


I think your best bet would be to use powershell or vbscript to do this if you want it completely invisible to the user.

  • Like 1
Link to comment

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
  • Create New...