Unattended agent not correctly reinstalling
I learned today one of our Windows devices was mistakenly removed from the GoToResolve console. Upon sending the user a link for a remote session and joining it, I tried several times to uninstall the Unattended Agent (through the context menu for the app in the system tray and Settings > Apps.)
Each uninstall seemed to work correctly, but when I sent a more recent installer for the Unattended Agent to their computer to reinstall and add back to the console, each time the agent installation failed claiming that it could not create the working directory (sorry I don't have the exact error message text on hand.)
What causes this error? How can I get around the error to get the agent to reinstall and add the device back to my console correctly? Do I need to uninstall it and delete any remnants that may be left behind in the Program Files directory? Given this user is in our executive group, I'd like to resolve this issue as quickly and simply as possible so I don't have to bother them to start an attended session if all I need is to run a few lines in Terminal/PowerShell.
If you have already removed Unattended Access and rebooted the device, but receive the following error when you try to reinstall, please use this clean-up script.