Reputation: 61
This always worked fine in Windows XP/Windows Server 2003, but I haven't yet been able to make it work right in Windows 7/Windows Server 2008 R2.
I've also tried putting this in Wow6432Node
, but that doesn't work, either. I've also tried various combinations of these registry entries, with seemingly no effect.
I've Googled this, but I can't seem to find anything related to this problem for whatever reason. I also cannot find any Microsoft documentation about how to accomplish this.
Essentially, we've got a big fancy Perl script that applies security settings to the system and it needs to add an entry to the "Uninstall or change a program" dialog so the installation can be audited later. (In reality, the audit script looks in the registry, so it works as is, but it would be useful to have the dialog window show it as well.)
The only thing that needs to be unique with this entry is that it should not be able to be uninstalled or modified.
In previous versions of Windows, these registry entries did exactly what I'd expect.
Here's an export of the registry values I'm setting currently:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram]
"DisplayName"="MyProgram"
"DisplayVersion"="101.0400.4120.1305141001"
"NoModify"=dword:00000001
"NoRemove"=dword:00000001
"NoRepair"=dword:00000001
"Publisher"="My Company"
"RegOwner"="My Company"
"UninstallString"=""
"VersionMajor"="4"
"VersionMinor"="1"
Does anyone have any thoughts on how to get Windows to show this in the uninstall dialog? Is there some other step I'm missing that's required to get Windows to pay attention to this entry?
Upvotes: 1
Views: 1009
Reputation: 61
I've figured this out, and it's fairly obvious. For some reason, there must be something specified as the UninstallString
, even though it will never be executed since the "program" cannot be uninstalled. I just used %SYSTEMROOT%\system32\calc.exe
since it will always exist on our systems.
Upvotes: 1