Uninstall the Agent from the command line
The Agent provides command-line arguments to support automated removal of the Agent through a custom script or software deployment tool. Uninstalling the Windows-based Agent from the command line requires the original installation package. If you are unsure of the availability or location of the original package on users' computers, you can distribute a copy of the exact installation package and have your command line reference it. The macOS-based Agent does not have this requirement.
To uninstall the Agent from the command line
-
To distribute a Windows-based Agent installation package, if necessary, do the following:
- In the upper-right corner of the Connected web application, click your name, and then click Downloads.
-
Under Download a Specific Agent on the Downloads page, select a specific Windows-based Agent, and then download it.
Choose the exact Agent version that you plan to remove.
-
If automating the uninstall process, update your deployment script or configure your deployment tool to copy the Agent installation package to the location of the Agent's application files.
For example, the default location for Windows-based Agents is:
C:\Program Files\Connected\
-
Uninstall the Agent using the appropriate command for the target operating system.
You can enter the command at a Terminal or Command Prompt or automate the process using the command in a custom script or software deployment tool.
-
For Windows-based computers, use the
msiexec
command. See example.To run the command in a Command Prompt window:
- Open a Command Prompt window, and then change directory to the location where you saved the package.
-
At the command prompt, enter the
Msiexec.exe
command that you want to use.For example, the following command silently uninstalls the Agent from the default location:
msiexec /qn /x C:\Program Files\Connected\ConnectedSetupUSW.msi /l*v C:\Connected_Uninstall.log
-
If prompted, restart the computer to complete the process.
If the process cannot completely uninstall a component in use by another application, it prompts you to restart the computer. After restart, the process automatically completes.
For the complete command-line syntax and examples, see Agent installer command-line reference (Windows).
-
For macOS-based computers, use the
uninstall
command. See example.To run the command in a Terminal prompt:
- Open Terminal, and then change directory to the location where you saved the package.
-
At the Terminal prompt, enter the
uninstall
command that you want to use.For example, the following command silently uninstalls the Agent from the default location and writes standard output and errors to log files:
sudo "/Library/Application Support/Connected/uninstall" >Connected_Uninstall.log 2>Connected_Uninstall_Errors.log
-
- If automating the Agent uninstall process through a script or deployment tool, initiate the deployment.