Launch a Program Hidden
Launch a Program Hidden is a JScript program that will launch a specified program hidden in Windows. The program will still show up in the Processes tab in Task Manager, but it will not show in the Applications tab, on the Start bar, or in the alt+tab list. This script is useful for running diagnostic programs that you don't want cluttering up the desktop or inadvertently closed by an inexperienced user. For example, the code below runs defrag on the D drive in a hidden window.
// Copyright 2017, Dean Tersigni. // The parameters for the run method are: // 1: The path to the program and any parameters. // 2: What window state to use: 0 = hidden, 1 = normal, etc. // 3: Flag to wait until program finishes before ending script. var oWSH = new ActiveXObject( "WScript.Shell" ); oWSH.run( '"C:\\Windows\\System32\\defrag.exe" D:', 0, false );