Uninstall WinZip code not working

(imported topic written by SystemAdmin)

Can anyone tell me why the below code will not work? I’ve only included the code that is hanging, so assume that the versions of WinZip that call the Winzip32.exe for uninstall are installed and this is an x64 box.

When run, the batch file is built correctly and executes, but the system hangs on Winzip32.exe when run via TEM. When I run the exact same batch file manually, it executes instantly and finished within seconds. Why is the call to Winzip32.exe hanging?

delete __appendfile
appendfile "C:\Program Files (x86)\Winzip\Winzip32.exe" /uninstallx
appendfile rd /S /Q "C:\Program Files (x86)\Winzip"
move __appendfile uninstallwinzip.bat
wait cmd /C uninstallwinzip.bat
delete uninstallwinzip.bat

(imported comment written by SystemAdmin)

If Winzip32.exe tries to display anything when it runs the uninstall then when the client tries to execute it, it will hang forever as services are not allowed to interact with the desktop (no display)

Searching quickly online, it shows some possibilities but does indicate that the uninstall may not be silent

(imported comment written by SystemAdmin)

Alan, thanks for the quick response.

I don’t believe Winzip32.exe is trying to display anything but I could be wrong. I’ve been told that the /uninstallx switch performs the silent uninstall for WinZip. When I run the batch file manually nothing pops up and it runs successfully.

Any reason why the exact same batch file when run with TEM wouldn’t work. Again, only seems to hang on the Winzip32.exe.

(imported comment written by SystemAdmin)

Generally that is the main reason. If you see it stuck and go to the machine and see if the process Winzip32.exe is still running.

Another test can be with the fixlets in BESSupport of 540 Enable BigFix Client Interacting with Desktop and then 541 Disable BigFix Client Interacting with Desktop. Run your fixlet in between (say in a baseline) and if it works you know it is doing something.

Another possibility is that the uninstall doesn’t like running as Local System. It may require running as a user. If you are using 8.2 or later you can use the override wait command, replacing your wait with:

override wait
   completion=job
   hidden=true
   runas=currentuser
wait cmd /C uninstallwinzip.bat

Note that you would have to add another piece of relevance to your fixlet of “exists current user” so that it will only run when someone is logged in.

(imported comment written by SystemAdmin)

Turns out that Winzip32.exe was trying to display something. I enabled client interaction with the desktop and was prompted with another service was using the files. We identified the service and are now stopping the service prior to the uninstall. Everything works like it should now.

Thanks Alan.