Repackaged MSI removes NetworkProvider Registry Key when uninstalled
Hi All,
I'm currently trying to repackage Netmange's ViewNow software using MacroVision\InstallShield's AdminStudio v7.0.
I'm only installing two components of the package - Telnet and NFS InterDrive
The Telnet part repackages fine. But the NFS InterDrive causes a LSSASS.exe error when the package is uninstalled and prevents the workstation from booting. After a bit of troubleshooting I managed to find what causes this problem. The application's setup routine modifies the following registry values:
HKLM\System\CurrentControlSet\Control\NetworkProvider\HwOrder\ProviderOrder
HKLM\System\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder
When the package is uninstalled the registry key HKLM\System\CurrentControlSet\Control\NetworkProvider is removed.
How can I leave the keys on the system?
The Install Only option is greyed out on the context menu. I've also tried to the delete then re-add the keys by importing them which then displays the + sign next to the registry entry indicating that it will Install Only but after testing this the key is still removed.
My knowledge is very much limited when it comes to repackaging so verbose replies would be very much appreciated.
Many thanks in advance
I'm currently trying to repackage Netmange's ViewNow software using MacroVision\InstallShield's AdminStudio v7.0.
I'm only installing two components of the package - Telnet and NFS InterDrive
The Telnet part repackages fine. But the NFS InterDrive causes a LSSASS.exe error when the package is uninstalled and prevents the workstation from booting. After a bit of troubleshooting I managed to find what causes this problem. The application's setup routine modifies the following registry values:
HKLM\System\CurrentControlSet\Control\NetworkProvider\HwOrder\ProviderOrder
HKLM\System\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder
When the package is uninstalled the registry key HKLM\System\CurrentControlSet\Control\NetworkProvider is removed.
How can I leave the keys on the system?
The Install Only option is greyed out on the context menu. I've also tried to the delete then re-add the keys by importing them which then displays the + sign next to the registry entry indicating that it will Install Only but after testing this the key is still removed.
My knowledge is very much limited when it comes to repackaging so verbose replies would be very much appreciated.
Many thanks in advance
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
MSIPackager
18 years ago
Hi,
Edit the package in Orca and find the registry keys which are getting uninstalled, then increment the attribute on the compnent installing them by +16 to make it permenant.
This will mean that all files / reg keys etc being installed by that component will be left behind. Therefore you may also want to move just the 2 reg entries in question into a new compenent (with a permenant attribute) to keep it tidy.
Here's more info: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/component_table.asp
Hope it helps,
Rob.
Edit the package in Orca and find the registry keys which are getting uninstalled, then increment the attribute on the compnent installing them by +16 to make it permenant.
This will mean that all files / reg keys etc being installed by that component will be left behind. Therefore you may also want to move just the 2 reg entries in question into a new compenent (with a permenant attribute) to keep it tidy.
Here's more info: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/component_table.asp
Hope it helps,
Rob.
Posted by:
akhlaque
18 years ago
Posted by:
fetgor
18 years ago
The leave installed on uninstalled canbe an option, but be aware that the string in the registrly will be longer and longer for each installation,andor version upgrade, until the computer is reinstalled.
The best solution is to use a VB script or a similar solution that add/removes only the desired informatin
/fetgor
The best solution is to use a VB script or a similar solution that add/removes only the desired informatin
/fetgor
Posted by:
dreamsurfer141
18 years ago
Many thanks for all your help and suggestions. I created a component called RegistryData_MachinePermanent then added the two registry settings to this component and made it permanent. The first time I tested this it failed. This was because I didn't manually create an entry in the FeatureComponents table linking the new component to the feature. Once I added this line the package works and is leaving the two registry settings on uninstall.
Unfortunately my VBScript skills are non existent at present but thanks fetgor. The package will not be upgraded so thats good.
Unfortunately my VBScript skills are non existent at present but thanks fetgor. The package will not be upgraded so thats good.
Posted by:
brenthunter2005
18 years ago
Have you tested the behaviour of the workstation after you have removed the application, yet leaving these registry keys in place. Windows will still try to load the provider DLL and fail. Does this have any knock-on effect?
The NetworkProvider stuff is kind of serious. You don't want to start having issues with that later on, do you.....?
I would suggest a custom action to remove the particular strings from the registry key(s) on uninstall.
The NetworkProvider stuff is kind of serious. You don't want to start having issues with that later on, do you.....?
I would suggest a custom action to remove the particular strings from the registry key(s) on uninstall.
Posted by:
dreamsurfer141
18 years ago
Posted by:
brenthunter2005
18 years ago
But what happens if you install another "application" (known as ApplicationB) that modifies these same registry keys? Then when your logon script runs, it will replace the values and your new "ApplicationB" will stop working!
Here is a small VBScript that you can use to remove the specified values from these keys:
Here is a small VBScript that you can use to remove the specified values from these keys:
strValueToRemove = "put_your_value_here"
Set objShell = CreateObject("WScript.Shell")
'Read the registry keys into variables
strCurrentValue_HwOrder = objShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder\ProviderOrder")
strCurrentValue_Order = objShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder")
'Split the value to an array and go through each one looking for the "value to remove". If found, exclude it from the new value.
arrHwOrder = Split(strCurrentValue_HwOrder, ",", -1, 1)
For x = 0 to UBound(arrHwOrder)
If arrHwOrder(x) <> strValueToRemove Then strNewValue_HwOrder = strNewValue_HwOrder & "," & arrHwOrder(x)
Next
arrOrder = Split(strCurrentValue_Order, ",", -1, 1)
For x = 0 to UBound(arrOrder)
If arrOrder(x) <> strValueToRemove Then strNewValue_Order = strNewValue_Order & "," & arrOrder(x)
Next
'Write the new registry values.
objShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder\ProviderOrder", Mid(strNewValue_HwOrder, 2), "REG_SZ"
objShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder", Mid(strNewValue_Order, 2), "REG_SZ"
Posted by:
dreamsurfer141
18 years ago
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.