Submitted By: Marc Johnson

Starts a VNC service on the remote computer. I keep the VNC service set to manual for security; this script lets me launch it when I need to.

Visual Basic
Edit|Remove
Dim  fso, oShell, Message

On Error Resume Next

Set oShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")

Message = InputBox("Enter name to be VNC'ed into:","Message Box")

'WScript.echo "You entered: " & Message

oShell.Run "c:\psexec.exe \\"+Message+" -s -d -u admin -c c:\docume~1\mar_john\mydocu~1\batchf~1\vncser~1.bat",1,True
oShell.Run "C:\vncviewer.exe  "+Message+""