Help needed in deleting registry...
Hi Everyone,
I'm new to scripting.. Many apologies if my question sounds silly...
In my work environment i should not use .reg files to add and delete registries..
My application installs more than 5000 registries but not removing on uninstall...
Scince this is silent push of exe i can't include in MSI and manage the removal.. only way i found is VBs..
Is there any easy way to delete these 5000 entries, because adding these entries is defenitely not going to be an easy work..
Many thanks in advance for your answers and time.
I'm new to scripting.. Many apologies if my question sounds silly...
In my work environment i should not use .reg files to add and delete registries..
My application installs more than 5000 registries but not removing on uninstall...
Scince this is silent push of exe i can't include in MSI and manage the removal.. only way i found is VBs..
Is there any easy way to delete these 5000 entries, because adding these entries is defenitely not going to be an easy work..
Many thanks in advance for your answers and time.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
andemats
13 years ago
If you have a reg file with the entries, just put a - in front of the entry.
Eg.
********Original*********
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SomeKey]
SomeValue="SomeNumber"
*****Remove entire key*****
Windows Registry Editor Version 5.00
[- HKEY_LOCAL_MACHINE\SOFTWARE\SomeKey]
*******Remove value*******
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SomeKey]
SomeValue=-
So, If you have a reg-file with 5000 entries, I would search and replace "[HKLM" with "[-HKLM" and then run the reg-file as usual.
Just make sure you dont delete any entries/values that might be needed for other things.
Eg.
********Original*********
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SomeKey]
SomeValue="SomeNumber"
*****Remove entire key*****
Windows Registry Editor Version 5.00
[
*******Remove value*******
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SomeKey]
SomeValue=
So, If you have a reg-file with 5000 entries, I would search and replace "[HKLM" with "[-HKLM" and then run the reg-file as usual.
Just make sure you dont delete any entries/values that might be needed for other things.
![](/build/static/general/appdeploy_logo.png)
so that the conversation will remain readable.