Uninstall script for Zapp

Hello Everyone,

We recently started rolling out Zscaler in our environment. I have a VSA system that i can push out the installation package from. The issue is we used the .exe instead of .MSI. Does anyone have a script or could tell me what switch to use for my script so i can use the password for uninstall?



Hi Justin,

Apologies for the delay in answering, hopefully this is not too late. This is a little more complex with .exe instead of MSI, but here are some options:

Batch Script:

SET ZSCALER_PASSWORD=<your_uninstall_password>
“%PROGRAMFILES(X86)%”\Zscaler\ZSAInstaller\uninstall.exe --mode unattended
) ELSE (
“%PROGRAMFILES%”\Zscaler\ZSAInstaller\uninstall.exe --mode unattended

VB Script:

Set shellScript = CreateObject(“WScript.Shell”)
Set fileSystem = CreateObject(“Scripting.FileSystemObject”)
Set processEnvironment = shellScript.Environment(“Process”)
processEnvironment(“ZSCALER_PASSWORD”) = “<your_logout_password>“
If (fileSystem.FolderExists(shellScript.ExpandEnvironmentStrings(”%PROGRAMFILES(X86)%”))) Then
Call shellScript.Run("""%PROGRAMFILES(X86)%\Zscaler\ZSAInstaller\uninstall.exe"" --mode unattended", 0, true)
Call shellScript.Run("""%PROGRAMFILES%\Zscaler\ZSAInstaller\uninstall.exe"" --mode unattended", 0, true)
End If

Steps to run:

• Replace <your_uninstall_password> with your actual Logout Password configured in App Profile. Please make sure password is in quotes for VBScript.
• Save this script to a file with .bat extension for Batch Script and .vbs extension for VBScript says “Uninstall-ZApp.bat”/“Uninstall-ZApp.vbs”
• Run CMD as Administrator
• Go-to folder containing “Uninstall-ZApp.bat”/“Uninstall-ZApp.vbs”
• Run “Uninstall-ZApp.bat”/“Uninstall-ZApp.vbs”

1 Like