www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

hide.vbs (567B)


      1 Option Explicit
      2 
      3 Dim WshShell, fso, exe, args, I
      4 
      5 Set WshShell = Wscript.CreateObject("Wscript.Shell")
      6 Set fso = WScript.CreateObject("Scripting.FileSystemObject")
      7 
      8 If WScript.Arguments.Count = 0 Then
      9   WScript.Echo "Usage: hidden.vbs program.exe [args...]"
     10   WScript.Quit 1
     11 End If
     12 
     13 exe = WScript.Arguments(0)
     14 If Not(fso.FileExists(exe)) Then
     15   WScript.Echo "Executable not found: " & exe
     16   WScript.Quit 1
     17 End If
     18 
     19 args = ""
     20 For I = 1 to WScript.Arguments.Count - 1
     21   args = args & " " & chr(34) & WScript.Arguments(I) & chr(34)
     22 Next
     23 
     24 WshShell.Run exe & args, 0, true