Description
Put this together to push uvnc onto a box for our help desk guys. Fairly straightforward copy PS > copy install to target > Install type thing.
Assumptions being you have a installer, .ini for your config and pstools folder to copy from the same location
Source Code
:: Define Variables
SET /p target="Enter target system name:- "
::copy PSExec to Local
MD "c:\pstools"
xcopy "\\<server>\<share>\pstools" "C:\pstools" /y
:: Check for previous install and remove ?
:: Set Path
cd C:\pstools
::Map System \ admin permission
net use \\%target%\c$ /user:<username> <password>
Copy \\<server>\<share>\ultraVNC.exe \\%target%\c$ /y
:: Install VNC
psexec \\%target% -u admin -p P(@dm)n c:\ultravnc.exe /verysilent
:: Copy .ini config file
Copy \\<server>\<share>\ultraVNC.ini "\\%target%\c$\Program Files (x86)\uvnc bvba\UltraVNC" /y
:: Set VNC to Run as a system service
psexec \\%target% -u admin -p P(@dm)n "C:\Program Files (x86)\uvnc bvba\UltraVNC\WinVNC.exe" -install
:: Set VNC to Run as a system service
sc \\%target% start uvnc_service start= auto
Echo UltraVNC Installed
Pause
1 Spice up
Having trouble with the syntax for the below command: SET /p target="Enter target system name:- " Can you give an example of what that should look like?
Having a little trouble with this script. I’m getting this when the script tries to authenticate to \target\c$ – System error 1219 has occured. Multiple connections to a server or shared resource by the same user, using more than one user name are not allowed. Disconnect all previous connections to the server or shared resource and try again. – I tried two different accounts. The second one was freshly created and never authenticated to anything. So, I’m not sure how the error happens. Any suggestions?
Update, I have it working. Nice little easy script, thanks! —EDIT: Works BETTER. Sometimes still errors on installs. Not sure why though.