1

I have a bat file that starts a program and already put my username and password, and I have to let the cmd open for the program to work. I want to hide the cmd window to prevent me from closing accidentally, here's the code:

*prgram.name* -o *server* -u *username* -p *password*

I need this hidden from eyes, but appearing in the task manager to close when I want it... Thanks

cure
  • 2,588
  • 1
  • 17
  • 25
  • Are you searching for the `start` command to let the cmd exit before the application terminated? In that case you might as well consider to just create a launcher for the application and insert the parameters there. Or are you searching for a way to programatically execute a batch file without a window? That is possible, but please tag your language and add the code you have in that case. – dst Oct 24 '13 at 00:16
  • With a simple Google search you can find many techniques on how to do this. Here is one that exists on [su] http://superuser.com/questions/62525/run-a-completly-hidden-batch-file – BDM Oct 24 '13 at 00:23
  • possible duplicate of [How can I hide ms-dos window when running a .bat file?](http://stackoverflow.com/questions/13580474/how-can-i-hide-ms-dos-window-when-running-a-bat-file) – Helen May 08 '14 at 15:03

2 Answers2

1

hide.vbs:

WScript.CreateObject("WScript.Shell").Run "*prgram.name* -o *server* -u *username* -p *password*", 0 , false

this will run the cmd hidden.

cure
  • 2,588
  • 1
  • 17
  • 25
0

There is a utility called CMDOW that can launch a cmd window that is hidden, amongst other things.
Some AV tools flag it as a hack tool because of that.

foxidrive
  • 40,353
  • 10
  • 53
  • 68