/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (8)

Posted by: MSIPackager 18 years ago
3rd Degree Black Belt
1
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.
Posted by: akhlaque 18 years ago
Orange Senior Belt
0
Hi Dream:

I am sure whether u are aware of an option Leave Installed uninstalled. This is the option in wise package studio when u goto SetupEditor-->Component-->then that registry key right click then goto details. U can see many options.
Posted by: fetgor 18 years ago
Senior Purple Belt
0
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
Posted by: dreamsurfer141 18 years ago
Senior Yellow Belt
0
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.
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
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.
Posted by: dreamsurfer141 18 years ago
Senior Yellow Belt
0
The system appears to be stable after uninstallion, however, I've configured my logon script to restore the keys back to their orginal state. I will use a custom action in the future (when my experience and VBScript knowledge has increased) as it will create a neater package.
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
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:

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
Senior Yellow Belt
0
Fair point but I placed logic in my logon script to test for the presence of the orphaned registry key (and also to test if the application has been uninstalled). However a big thanks for the VB Script I will give it a try and let you know.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ