Uninstall keys in registry.
If i have my product installed on a machine with User account control enabled etc, then when i uninstall it from ARP i get a UAC prompt "Do you want to allow the following program to update software on this computer" with the program listed as "3544.msi" ( i refer to this as an uninstall with UPDATE warning )
I have many products installed on my test machine and most them behave like this when uninstalling them.
However, a smallish number of products don't display this prompt but display "Do you want to allow the following program to make changes to this computer" with the program listed as "Uninstall or change an application" ( i refer to this as an uninstall with CHANGE warning )
I want my program to behave like the smallish number of products above and perform an "uninstall with CHANGE warning".
How do i go about doing this ? Whilst investigating, i've noticed that all products that uninstall with UPDATE warning are 'represented' under HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall with a {GUID} key. However, all products that uninstall with CHANGE warning are 'represented' under HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall with an 'application name' key. They are also represented with a {GUID} key but have SystemComponent set to 1 so the 'GUID' variant doesn't appear in ARP.
I thought that all installed products were represented under this key as {GUID} but this is obviously not the case.
If i manually create a HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\'application name' key for my product and stick an UninstallString in there (along with a few other things) and set SystemComponent set to 1 so the 'GUID' variant doesn't appear in ARP then my product does uninstall with the CHANGE warning as i want. However, i don't want to implement this as a fix without understanding a bit more as to what's going on.
Many thanks for any help/pointers etc.
Adrian
I have many products installed on my test machine and most them behave like this when uninstalling them.
However, a smallish number of products don't display this prompt but display "Do you want to allow the following program to make changes to this computer" with the program listed as "Uninstall or change an application" ( i refer to this as an uninstall with CHANGE warning )
I want my program to behave like the smallish number of products above and perform an "uninstall with CHANGE warning".
How do i go about doing this ? Whilst investigating, i've noticed that all products that uninstall with UPDATE warning are 'represented' under HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall with a {GUID} key. However, all products that uninstall with CHANGE warning are 'represented' under HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall with an 'application name' key. They are also represented with a {GUID} key but have SystemComponent set to 1 so the 'GUID' variant doesn't appear in ARP.
I thought that all installed products were represented under this key as {GUID} but this is obviously not the case.
If i manually create a HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\'application name' key for my product and stick an UninstallString in there (along with a few other things) and set SystemComponent set to 1 so the 'GUID' variant doesn't appear in ARP then my product does uninstall with the CHANGE warning as i want. However, i don't want to implement this as a fix without understanding a bit more as to what's going on.
Many thanks for any help/pointers etc.
Adrian
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
mazessj
12 years ago
Does it really matter?
Off the cuff, I would guess that Windows is recognizing the difference between a Windows Installer ARP entry (the one with the {GUID}) and a non-Windows installer ARP entry and prompts differently because Windows Installer follows stricter guidelines than other installation technologies. Apparently Microsoft refers to WI installation/uninstallation activity generically as an "update." An uninstall of a non-MSI is less certain and is referred to generically as a "change." Microsoft has no way to know if the UninstallString for a non-MSI is even an uninstaller at all. "Update" specifically indicates that the software will be altered. "Change" is less specific and indicates that anything could happen. I'm guessing.
I think you'll only be able to accomplish what you're trying to do by doing exactly what you did -- creating an alternate ARP entry that is not recognized by Windows Installer.
This is just an educated guess.
Off the cuff, I would guess that Windows is recognizing the difference between a Windows Installer ARP entry (the one with the {GUID}) and a non-Windows installer ARP entry and prompts differently because Windows Installer follows stricter guidelines than other installation technologies. Apparently Microsoft refers to WI installation/uninstallation activity generically as an "update." An uninstall of a non-MSI is less certain and is referred to generically as a "change." Microsoft has no way to know if the UninstallString for a non-MSI is even an uninstaller at all. "Update" specifically indicates that the software will be altered. "Change" is less specific and indicates that anything could happen. I'm guessing.
I think you'll only be able to accomplish what you're trying to do by doing exactly what you did -- creating an alternate ARP entry that is not recognized by Windows Installer.
This is just an educated guess.
Posted by:
jmaclaurin
12 years ago
When it comes to UAC, there are a number of factors that come into play when an installer is handled. The biggest being whether or not the installer or its components are Microsoft Digitally signed. Beyond that, its the obvious things like if your application is an MSI, it calls msiexec.exe and in doing so, will likely always generate a UAC prompt because the Windows Installer Service always runs in administrative mode (as System), which in the case of Win7, is elevated above any User level Administrator permissions.
Another thing that comes into play is when an installer launches other installers to manage its changes, and the further down the chain, the more likely a UAC prompt.
The only possible exception, although limited, is if the changes being made do not write outside of the users profile or outside of the users registry hive (HKCU) or in an location that is UAC monitored or protected. No guarantee here either.
Look up Session Zero for a more confusing explanation.
If you have some applications that run without UAC prompt, then the changes they are making appear to be in areas that are not UAC monitored or protected or they are digitally signed.
If your looking for a way to make an exception list, UAC does not have that capability by design for obvious reasons. The only real options are to request an updated application from the vendor (no guarantee of a fix here), turn off UAC or just deal with it.
Another thing that comes into play is when an installer launches other installers to manage its changes, and the further down the chain, the more likely a UAC prompt.
The only possible exception, although limited, is if the changes being made do not write outside of the users profile or outside of the users registry hive (HKCU) or in an location that is UAC monitored or protected. No guarantee here either.
Look up Session Zero for a more confusing explanation.
If you have some applications that run without UAC prompt, then the changes they are making appear to be in areas that are not UAC monitored or protected or they are digitally signed.
If your looking for a way to make an exception list, UAC does not have that capability by design for obvious reasons. The only real options are to request an updated application from the vendor (no guarantee of a fix here), turn off UAC or just deal with it.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.