Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function IsProcessRunning(strComputer, strProcess)
- Dim Process, strObject
- IsProcessRunning = False
- strObject = "winmgmts://" & strComputer
- For Each Process in GetObject(strObject).InstancesOf("win32_process")
- If UCase(Process.name) = UCase(strProcess) Then
- IsProcessRunning = True
- Exit Function
- End If
- Next
- End Function
- Set objShell = Wscript.CreateObject("Wscript.Shell")
- If NOT IsProcessRunning(".", "vcxsrv.exe") Then
- objShell.Popup "We will launch vcxsrv.exe first!", 1, "VcXSrv is not running", 64
- objShell.Exec("C:\Program Files\VcXsrv\vcxsrv.exe :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl")
- End If
- args = "-c" & " -l " & """DISPLAY=:0 terminator"""
- WScript.CreateObject("Shell.Application").ShellExecute "bash", args, "", "open", 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement