3

I have a test.cmd file on my desktop. In it contains the following line:

cmd.exe /c "cscript foo.js"

Is it possible to completely silence/quiet/supress/hide any and all console windows from popping up? I would like to execute the .cmd without any popup windows.

Eryk Sun
  • 33,190
  • 5
  • 92
  • 111
Nicole
  • 99
  • 3
  • 7

2 Answers2

4

Create on your desktop a shortcut file (*.lnk) with the command line:

%SystemRoot%\System32\wscript.exe foo.js

Then the JScript file is interpreted with GUI version of Windows Script Host instead of the console version which prevents displaying a console window.

Run wscript /? for help on this executable in comparison to cscript /?.

Mofi
  • 46,139
  • 17
  • 80
  • 143
0

You could try right click on shortcut -> Properties -> Run -> minimised. Not perfect but maybe no-one will notice.

Paul Sanders
  • 24,133
  • 4
  • 26
  • 48