A similar script may exist... but I haven't searched for one.... I wrote this from scratch
If you post this script elsewhere, please give credit where credit is due. That's all I ask.
This works best in a domain environment (including different subnets) with Domain Admin access.
I use PsExec in my script:
http://technet.microsoft.com/en-us/sysi ... 96649.aspx
The Script:
Code: Select all
@echo off
Title Ultr@VNC Single Click... Script written by Hickory420
:start
@echo.
set /p pc=Computer you wish to control:
@echo.
echo Pinging %pc%...
set usr=domain\username
set pwd=password
ping %pc% -n 2 -w 500 | find /I "Reply from" >NUL
If ErrorLevel 1 goto noping
@echo --------------------------
psexec \\%pc% -u %usr% -p %pwd% -c -f -i -d ultravncsc.exe | call "C:\Program Files\UltraVNC\vncviewer.exe" ID:420 -proxy 192.168.20.56::5901
@echo --------------------------
@echo.
@echo Closing the VNC connection
goto Done
:noping
cls
@echo.
@echo Can not Ping Host...
@echo.
goto start
:Done
@echo.
@echo --------------------------
@echo.
@echo Deleting... ultravncsc.exe
del \\%pc%\C$\Windows\System32\ultravncsc.exe
@echo Done
pause
The following is the important part of my Helpdesk.txt
Code: Select all
[DIRECT]
[HOST]
Helpdesk Support
-ID 420 -connect 192.168.20.56::5500 -noregistry
Enjoy!!!