I'd like to start a console app upon startup, but I'd like it not to clutter the taskbar with a cmd.exe item. The options I have when editing a shortcut are only "Normal window", "Minimized", and "Maximized". I faintly remember some WIndows version having "Hidden" as an option. I'm using Windows 2008.
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
I've had this problem too, I wrote a small app that does this: http://miffthefox.googlepages.com/silentcmd. |
|||
|
|
|
You can create a .vbs file with the following Const HIDDEN_WINDOW = 12
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")
Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create("Cmd.exe /c C:\run.bat", null, objConfig, intProcessID)
And replace "Cmd.exe /c C:\run.bat"with your silent command |
|||||||
|
|
According to this page from the MSDN setting
Though it also states:
|
|||
|
|