Uninstall VNC - Install specific version. Need help with a few things

(imported topic written by tscott91)

I’m trying to get all of our PC’s on a standard VNC version… I’ve created the following Fixlet which works great all except one part, it doesn’t install the video driver… The very last line is the code to install the driver… Here is the weird part that I can’t figure out…

It doesn’t work when I run that… I’ve also tried using

wait “{pathname of system folder & “\cmd.exe”}” /C “{(pathname of client folder of current site) & “__Download\driver\Install.bat”}”

which is the actual bat file that is included to install it (which is just the command I have below).

The very weird part that I can’t figure out?? If I go into the BigFix __Download directory and manually run the install.bat file inside the \driver folder it installs fine!

Any ideas?!

Thanks!

delete __appendfile

delete “__Download\InstallVNC.Bat”

appendfile cd “{pathname of parent folder of regapp “BESClient.exe” & “__BESData\actionsite__Download”}”

appendfile net stop winvnc

appendfile “C:\Program Files\UltraVNC\unins000.exe” /silent /norestart

appendfile “C:\Program Files\UltraVNC\unins001.exe” /silent /norestart

appendfile “C:\Program Files\UltraVNC\unins002.exe” /silent /norestart

appendfile “C:\Program Files\RealVNC\unins000.exe” /silent /norestart

appendfile C:\WINDOWS\ISUNINST.EXE -f"C:\Program Files\ORL\VNC\Uninst.isu" -a

appendfile C:\WINNT\ISUNINST.EXE -f"C:\Program Files\ORL\VNC\Uninst.isu" -a

appendfile “C:\Program Files\TridiaVNC\UninstallerData\Uninstall TridiaVNC.exe” /silent /norestart

appendfile md “C:\Program Files\UltraVNC”

appendfile xcopy /e /y

.

“C:\Program Files\UltraVNC”

appendfile “C:\Program Files\UltraVNC\winvnc.exe” -install

appendfile mslogonacl.exe /i /o fpb.txt

appendfile CD Shortcuts

appendfile xcopy /e /y

.

“C:\Documents and Settings\All Users\Start Menu\Programs”

//copy the newly-created file to a different file name

copy __appendfile “__Download\InstallVNC.bat”

//execute your bat file or script

wait “{pathname of system folder & “\cmd.exe”}” /C “{(pathname of client folder of current site) & “__Download\InstallVNC.bat”}”

wait “{pathname of system folder & “\cmd.exe”}” /C “{(pathname of client folder of current site) & “__Download\driver\setupdrv”} install”

(imported comment written by BenKus)

Probably your install.bat contains a relative path… this won’t work because the agent’s current working folder is the action site folder and not the __Download folder. Add “cd __Download” as the first line of the batch file and it should work.

Ben

(imported comment written by tscott91)

I still can’t get this working and it’s driving me nuts… The install.bat file that comes with the actual video drive install simply contains:

setupdrv install

That folder where the install.bat is contains the setupdrv.exe and a folder named “driver” with some files in it…

I can’t figure out why when I run

wait “{pathname of system folder & “\cmd.exe”}” /C “{(pathname of client folder of current site) & “__Download\driver\setupdrv”} install”

it doesn’t work since that is the same command in the install.bat file that DOES work… What I do know is that I can simply doubleclick the install.bat file in that directory and it will install…

I’m not sure what install.bat you are suggesting I change… Here is the structure: http://img560.imageshack.us/img560/6648/110111084925itlap192168.jpg

Here is the driver folder structure:

http://img560.imageshack.us/img560/2655/11011108504itlap1921681.jpg

This should be so simple but it’s driving me nuts that I can’t figure it out! Is there any way to make things visible so I can see on the client what is going on?

(imported comment written by tscott91)

Some more info… Here is my latest action code:

delete __appendfile delete 
"__Download\InstallVNC.Bat"     appendfile cd 
"{pathname of parent folder of regapp "BESClient.exe
" & "\__BESData\actionsite\__Download
"}" appendfile net stop winvnc appendfile 
"C:\Program Files\UltraVNC\unins000.exe" /silent /norestart appendfile 
"C:\Program Files\UltraVNC\unins001.exe" /silent /norestart appendfile 
"C:\Program Files\UltraVNC\unins002.exe" /silent /norestart appendfile 
"C:\Program Files\RealVNC\unins000.exe" /silent /norestart appendfile C:\WINDOWS\ISUNINST.EXE -f
"C:\Program Files\ORL\VNC\Uninst.isu" -a appendfile C:\WINNT\ISUNINST.EXE -f
"C:\Program Files\ORL\VNC\Uninst.isu" -a appendfile 
"C:\Program Files\TridiaVNC\UninstallerData\Uninstall TridiaVNC.exe" /silent /norestart   appendfile md 
"C:\Program Files\UltraVNC" appendfile xcopy /e /y *.* 
"C:\Program Files\UltraVNC" appendfile 
"C:\Program Files\UltraVNC\winvnc.exe" -install appendfile mslogonacl.exe /i /o fpb.txt appendfile CD Shortcuts appendfile xcopy /e /y *.* 
"C:\Documents and Settings\All Users\Start Menu\Programs" appendfile CD\ appendfile CD 
"C:\Program Files\UltraVNC\driver" appendfile setupdrv install   
//copy the newly-created file to a different file name copy __appendfile 
"__Download\InstallVNC.bat"   
//execute your bat file or script wait 
"{pathname of system folder & "\cmd.exe
"}" /C 
"{(pathname of client folder of current site) & "\__Download\InstallVNC.bat
"}"

What seems to be happening is the “setupdrv install” is hanging or something… If I open taskmgr both setupdrv.exe and cmd.exe are open and they never close out…

However, again, if I run that same exact bat file that I create above, it installs fine! WTF?!

(imported comment written by NoahSalzman)

Try using runascurrent user (just as a troubleshooting exercise)… maybe setupdrv.exe is trying to do something that requires the registry to… blah blah blah, waves hands…

(imported comment written by tscott91)

Just that last command or the entire bat file?

(imported comment written by NoahSalzman)

For just the line in the action script that executes setupdrv.

(imported comment written by tscott91)

OK. Here is my code now… I at least get something different this time… The driver install pops up with “Driver Installation Failed”…

download http://PATCH-FS:52311/Uploads/ed22401af197b33ff1772cf90eb6356770dd0aaf/UltraVNC.tmp

continue if {(size of it = 2676925 AND sha1 of it = “ed22401af197b33ff1772cf90eb6356770dd0aaf”) of file “UltraVNC.tmp” of folder “__Download”}

prefetch RunAsCurrentUser.exe sha1:a72371f4e968da7ead24f0f4e68c14b234ac94f6 size:184320 http://software.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.exe

utility __Download\RunAsCurrentUser.exe

extract UltraVNC.tmp

delete __appendfile

delete “__Download\InstallVNC.Bat”

appendfile cd “{pathname of parent folder of regapp “BESClient.exe” & “__BESData\actionsite__Download”}”

appendfile net stop winvnc

appendfile “C:\Program Files\UltraVNC\unins000.exe” /silent /norestart

appendfile “C:\Program Files\UltraVNC\unins001.exe” /silent /norestart

appendfile “C:\Program Files\UltraVNC\unins002.exe” /silent /norestart

appendfile “C:\Program Files\RealVNC\unins000.exe” /silent /norestart

appendfile C:\WINDOWS\ISUNINST.EXE -f"C:\Program Files\ORL\VNC\Uninst.isu" -a

appendfile C:\WINNT\ISUNINST.EXE -f"C:\Program Files\ORL\VNC\Uninst.isu" -a

appendfile “C:\Program Files\TridiaVNC\UninstallerData\Uninstall TridiaVNC.exe” /silent /norestart

appendfile md “C:\Program Files\UltraVNC”

appendfile xcopy /e /y

.

“C:\Program Files\UltraVNC”

appendfile “C:\Program Files\UltraVNC\winvnc.exe” -install

appendfile mslogonacl.exe /i /o fpb.txt

appendfile CD Shortcuts

appendfile xcopy /e /y

.

“C:\Documents and Settings\All Users\Start Menu\Programs”

appendfile CD\

appendfile CD “C:\Program Files\UltraVNC\driver”

// appendfile setupdrv install

//copy the newly-created file to a different file name

copy __appendfile “__Download\InstallVNC.bat”

//execute your bat file or script

wait “{pathname of system folder & “\cmd.exe”}” /C “{(pathname of client folder of current site) & “__Download\InstallVNC.bat”}”

waithidden __Download\RunAsCurrentUser.exe “C:\Program Files\UltraVNC\driver\setupdrv.exe” install

(imported comment written by NoahSalzman)

OK… dumb suggestion on my part, no perms to install the driver… however, it occurs to me that if you change waithidden to wait you will be able to see what it is doing and maybe see an error?

(imported comment written by tscott91)

Nope, I don’t see anything when using wait instead of waithidden…

(imported comment written by tscott91)

So is the reason this is failing is because it’s trying to install a driver? Is there any way I can get this accomplished?

Thanks much!