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