Is there a way to remove a program that requires admin access to uninstall, but does not prompt for it?
It wasn't pretty but I've resolved this for myself by manually hunting down all references to my product in the registry and deleting those keys. I've also changed my installation to per-machine (for the time being) to force elevation for both installation and uninstallation.
I'd still appreciate a solution that doesn't involve messing with the registry if there is one, just in case for future reference.
Related videos on Youtube
Tagc
Updated on September 18, 2022Comments
-
Tagc over 1 year
I'm using Advanced Installer to try and create an installer (.exe) for an application I've created. Part of the installation process involves installing a USB driver.
After building my installer, I tried running it but it kept failing due to a DIFXAPP error where it was unable to write keys to the registry. After running the installer as an administrator, I was able to install the application.
However, I'm now having trouble uninstalling the program for a similar reason - during the uninstall process, DIFX will try to access the key in the registry that it added during installation (presumably to remove it). However, without admin rights this fails, causing the uninstallation process to rollback.
I'm doing all this on a Windows 7 64-bit machine. Is there a way to force a program to be uninstalled using elevated access?
-
var firstName almost 7 yearsIn the installation directory, is there perhaps an uninstall.exe file?
-
Tagc almost 7 years@varfirstName Unfortunately not.
-
Tagc almost 7 yearsOften you can also use the installer itself to repair/uninstall the program if it was previously installed, but mine just says that I have to use Add/Remove Programs to do so.
-
Nathan.Eilisha Shiraini almost 7 yearsIf your installer creator is advertised as Windows 7 compatible, it should have an option to handle UAC. If it doesn't, I suggest you consider using another one, since it is a strong sign of outdated software. MSI (Microsoft Installer) is the canonical way to create installers for Windows, and Windows has a native tool to create MSI packages.
-
Tagc almost 7 years@NathanShiraini Advanced Installer is modern and does have a way to handle UAC. However, I didn't realise while building the installer that I'd need to force elevated access (it has a checkbox for it). As a test, I tried running the already-built executable with elevated access, which allowed the program to install. But because the installer itself isn't expecting to be run with elevated access, I guess it doesn't prompt for it when trying to uninstall.
-
Nathan.Eilisha Shiraini almost 7 yearsEven if you didn't modify drivers, you would need elevated permissions to 1. write files in
C:\Program Files
orC:\Program Files (x86)
and 2. add your program to the list of installed programs (the one displayed in Configuration Panel). -
Tagc almost 7 years@NathanShiraini My program is installed under
AppData/Roaming
, which does not require elevated rights. 2. also does not seem to require admin access as I've installed other products under the same directory (that don't require driver installation) and they install fine without elevated rights.
-