cbrxxrider Posted March 12, 2014 Posted March 12, 2014 (edited) Script noob here, I've been trying to come up with a scrip which runs a batch file that uninstalls any vnc software and then installs ultravnc. I''d like to add the if/then statement similar to below which will look to see if TightVNC exists and if so will run the uninstall batch to remove, then if needed install the new UltraVNC through msi installer, otherwise it will just exit. I am going to add this into the computer startup script. I'm hoping somebody might be able to look at this and tell me if I'm even close. ------------ if exist "C:\Program Files\TightVNC\." goto Action1 if not exist "C:\ultravnc.txt" goto Action2 goto Action3 :Action1 \\server\VNCDeploy\removevnc.bat goto END :Action2 if exist %SystemRoot%\SysWOW64 goto 64-bit \\server\VNCDeploy\UltraVnc_10962_x86.msi echo "UltraVNC" > "c:\ultravnc.txt" goto END :64-bit \\server\VNCDeploy\UltraVnc_10962_x64.msi echo "UltraVNC" > "c"\ultravnc.txt" goto END :Action3 :END Edited March 12, 2014 by cbrxxrider script edit
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now