jcunews

RunHide.vbs

Dec 18th, 2020 (edited)
601
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'RunHide v1.0.1
  2. 'https://pastebin.com/u/jcunews
  3. 'https://www.reddit.com/user/jcunews1
  4. 'https://greasyfork.org/en/users/85671-jcunews
  5. '
  6. 'Runs given application file and optional arguments, or open given
  7. 'document file with its assotiated application with its GUI hidden.
  8. 'Note: applications have rights to ignore the suggested GUI preference.
  9.  
  10. wait = false
  11. prog = ""
  12. params = ""
  13. for each p in wscript.arguments
  14.   if prog = "" then
  15.     if ucase(p) = "/WAIT" then
  16.       wait = true
  17.     else
  18.       prog = """" & p & """"
  19.     end if
  20.   elseif instr(p, " ") > 0 then
  21.     params = params & " """ & p & """"
  22.   else
  23.     params = params & " " & p
  24.   end if
  25. next
  26. if prog = "" then
  27.   wscript.echo "Usage: RunHide [/wait] {program} [arguments...]"
  28.   wscript.quit
  29. end if
  30. createobject("wscript.shell").run prog & params, 0, wait
  31.  
Add Comment
Please, Sign In to add comment