Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Run given command line as hidden. Non-intrusive. No window flashing.
- //Note: hidden as a suggestion to the executed application. Applications always have the final decision on how to show their UI.
- //This script is only for use with Windows Script Host.
- //Usage e.g.:
- // wscript.exe Runhide.js "d:\my apps\the app.exe" param1 "param 2" etc.
- a = [];
- e = new Enumerator(WSH.arguments);
- while (!e.atEnd()) {
- a.push(/\s/.test(s = e.item(^).replace(/''/g, '"')) ? '"'+s+'"' : s);
- e.moveNext()
- }
- if (a.length) new ActiveXObject("wscript.shell").run(a.join(" "), 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement