This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Delete Registry value
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 06, 2011
04:31 PM
Delete Registry value
I am trying to delete a value from the registry when installing or patching so that the registry count remains at 1.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
Does anyone has done this before and or can show me some Installshield code to do it? I am trying to go away with using vbscript. There are some limitation and vbscript engine is not always installed causing the Custom Action to error out. Thank you in advance.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
Does anyone has done this before and or can show me some Installshield code to do it? I am trying to go away with using vbscript. There are some limitation and vbscript engine is not always installed causing the Custom Action to error out. Thank you in advance.
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 07, 2011
12:26 AM
Try using:
RegDBSetKeyValueEx Installscript function.
But it would be better if you could give some more info about the background of the problem so that a better solution, if any, can be found.
RegDBSetKeyValueEx Installscript function.
But it would be better if you could give some more info about the background of the problem so that a better solution, if any, can be found.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 07, 2011
12:33 AM
use the following instal scipt functions
RegDBDeleteKey - it will deletes a specific key and its associated value from the registry.
RegDBDeleteValue - it will deletes a value from a specific key in the registry
InstallShiled Help File will give you the sample code
RegDBDeleteKey - it will deletes a specific key and its associated value from the registry.
RegDBDeleteValue - it will deletes a value from a specific key in the registry
InstallShiled Help File will give you the sample code
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 07, 2011
01:01 AM
mano.n.s75,
The requirement is not clear at all...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
should not be deleted, and should only be modified if the outcome is known and certain. That is why I asked for further details and gave the poster a function that updates rather than deletes...
I am trying to delete a value from the registry when installing or patching so that the registry count remains at 1.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
The requirement is not clear at all...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
should not be deleted, and should only be modified if the outcome is known and certain. That is why I asked for further details and gave the poster a function that updates rather than deletes...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 07, 2011
01:58 AM
MSIYER,
Yes you are right, I totally agree with you.
Yes you are right, I totally agree with you.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 13, 2011
08:23 AM
Be careful - there be dragons here.
You really shouldn't be modifying the SharedDlls unless you know exactly what you are doing. The OS keeps a refcount of all files marked as Shared. On uninstall, InstallShield/Windows Installer will automatically decrement the refcount until it reaches 0, at which point the file is removed.
In general, this all happens automatically so you shouldn't need to manually edit the SharedDLLs registry location.
If you aren't careful, changing values here could result in needed files getting removed and applications breaking. Be ESPECIALLY careful if these SharedDLLs are components that might be used by other applications, such as redistributables or GAC files.
If you do decide to modify SharedDLLs, InstallScript is much easier than VBScript, as noted by the previous posters. Be aware that on 64bit Vista and Win7, there are two locations where the SharedDLLs could be saved, depending on whether you have a 32-bit or a 64-bit installer. You can use REGDB_OPTION_WOW64_64KEY to enable the 64-bit usage with the registry functions.
You really shouldn't be modifying the SharedDlls unless you know exactly what you are doing. The OS keeps a refcount of all files marked as Shared. On uninstall, InstallShield/Windows Installer will automatically decrement the refcount until it reaches 0, at which point the file is removed.
In general, this all happens automatically so you shouldn't need to manually edit the SharedDLLs registry location.
If you aren't careful, changing values here could result in needed files getting removed and applications breaking. Be ESPECIALLY careful if these SharedDLLs are components that might be used by other applications, such as redistributables or GAC files.
If you do decide to modify SharedDLLs, InstallScript is much easier than VBScript, as noted by the previous posters. Be aware that on 64bit Vista and Win7, there are two locations where the SharedDLLs could be saved, depending on whether you have a 32-bit or a 64-bit installer. You can use REGDB_OPTION_WOW64_64KEY to enable the 64-bit usage with the registry functions.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 03, 2011
06:21 PM
So sorry, I never a get an email notifying that the thread has some new posts. I accidentally went back today found all this replies. Anyway, I am doing this on purpose. The original count is at 1 but after applying the patch, the dll gets incremented to 2 even the patch only uses the binary difference not the whole file so when I uninstall the product, the dll remains behind. Thanks again.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 04, 2011
08:20 AM
Tom, Does your patch have the same Upgrade Code as the original installer? I highly recommend not changing your upgrade code.
Community, am I correct in assuming that an upgrade/patch with the same upgrade could should not change the SharedDLLs refcount, regardless of whether the file changed or not?
Community, am I correct in assuming that an upgrade/patch with the same upgrade could should not change the SharedDLLs refcount, regardless of whether the file changed or not?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 08, 2011
06:15 PM
MGarret,
I think when I build the patch, Installshield automatically change the upgrade code. I will double check and get back to you. Thanks for replying.
I think when I build the patch, Installshield automatically change the upgrade code. I will double check and get back to you. Thanks for replying.