How to delete a Reg Key without a permission
Wise Installation Studio 7
I have a problem on deleting a Registry Key in HKEY_CLASSES_ROOT\CLSID
On uninstalling my app Windows Installer tells me that I don't have the permission to delete the key called Dummy e.g.
How can I manage it to get this permission on programming...
Thanks in advance...
I have a problem on deleting a Registry Key in HKEY_CLASSES_ROOT\CLSID
On uninstalling my app Windows Installer tells me that I don't have the permission to delete the key called Dummy e.g.
How can I manage it to get this permission on programming...
Thanks in advance...
0 Comments
[ + ] Show comments
Answers (10)
Please log in to answer
Posted by:
mekaywe
14 years ago
Posted by:
McRip
14 years ago
Posted by:
anonymous_9363
14 years ago
The user account with which you're uninstalling has insufficient access rights to delete the key. You need to uninstall (and install, for that matter) with an admin-level account. If you're using the local administrator account and still can't remove the key, you have problems outside of the scope of packaging/scripting.
Posted by:
anonymous_9363
14 years ago
Is that key coming from your app? If so it will be deleted automaticallyCan you explain the logic behind this assertion? How does any package (note: package, not application) know whether or not a registry value or key is safe to delete? An extreme example but have a go at deleting 'HKEY_CLASSES_ROOT\CLSID\{00000300-0000-0000-C000-000000000046}' and see how far your machine gets.
If the key is used by any other application during uninstalling ur app. It will not be deleted.
Posted by:
mekaywe
14 years ago
Posted by:
McRip
14 years ago
I can not delete this key by myself using regedit. I am Administrator and not allowed to delete this key. I have manually set the permission to delete it.
Which commandline tool can I integrate into my installer to get the key deleted?
I have tried using substinacle, regini and all this stuff. It all was not successful.
What can I do?
Which commandline tool can I integrate into my installer to get the key deleted?
I have tried using substinacle, regini and all this stuff. It all was not successful.
What can I do?
Posted by:
anonymous_9363
14 years ago
I am Administrator and not allowed to delete this keyWhat permissions does the key have? It wouldn't be connected with an Adobe product, by any chance, would it? They *love* to screw with permissions.
Anyway, see what accounts/groups have 'Delete' rights, make yourself a member of one of those groups and you should then be able to delete it. One dodge you can try if that's no good is running CMD.EXE via the 'AT' scheduler. That gets you a command window with the the local 'System' account:
AT hh:mm /interactive cmd.exe
Run RegEdit from that window. If THAT account doesn't have rights, you're pretty much screwed.
Posted by:
McRip
14 years ago
Posted by:
cygan
14 years ago
Posted by:
McRip
14 years ago
Download the latest version from subinacle from microsoft:
Extract the MSI file with uniextract or something. In that extracted folder you'll find the folder called files. And in the files folder you will see subinacle.exe.
This is a commandline tool for setting new permissions on registry keys.
Just open subinacle via cmd with the following command:
The installer can then delete the key without any errors, cause you have full access for the key.
I integrated in my installer "Execute program from installation" with the command above and it works like charm on each operating system.
Do not use subinacle from the Win2k CD. This older version has some bugs. Use the one frm above.
Edit: Instead of using the variable"%username%" it's better to use "[LogonUser]" for a CustomAction.
Cheers
http://download.microsoft.com/download/1/7/d/17d82b72-bc6a-4dc8-bfaa-98b37b22b367/subinacl.msi
Extract the MSI file with uniextract or something. In that extracted folder you'll find the folder called files. And in the files folder you will see subinacle.exe.
This is a commandline tool for setting new permissions on registry keys.
Just open subinacle via cmd with the following command:
subinacl.exe /keyreg HKEY_CLASSES_ROOT\CLSID\{436F4AD7-C95B-4d2f-B0F8-8DC643F7A200} /grant=[LogonUser] =F
The installer can then delete the key without any errors, cause you have full access for the key.
I integrated in my installer "Execute program from installation" with the command above and it works like charm on each operating system.
Do not use subinacle from the Win2k CD. This older version has some bugs. Use the one frm above.
Edit: Instead of using the variable"%username%" it's better to use "[LogonUser]" for a CustomAction.
Cheers
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.