/build/static/layout/Breadcrumb_cap_w.png

ReinstallFeature method of the Installer object

How can I tell if calling the ReinstallFeature method of the Installer object has successfully completed?
This method does not return a value.

If I use:
err.Clear
oInstaller.ReinstallFeature Product,Feature,256
If err.Number = 0 Then
MsgBox "Success"
Else
MsgBox "Failed" & vbcrlf & err.Number & vbcrlf & err.Description
End If

Sometimes the err.number is -2147467259 on calls that have appeared to be successful.
The description is "ReinstallFeature,Product,Feature,ReinstallMode"

ALSO If I run msiexec /iProductCode REINSTALL=Feature /l*v "C:\f.log"
The log file does not contain the error number above and the reinstall was successful.

0 Comments   [ + ] Show comments

Answers (3)

Posted by: aogilmor 17 years ago
9th Degree Black Belt
0
iirc the windows installer returns different codes and not all are 0=success.
it should be in the sdk.
you may want to user your oInstaller object to query the installed state of the feature and take action based on that.....also, Windows installer can query whether features have been installed. You don't need WMI for that. For example, I believe that the condition !Complete = 3 means the feature Complete is installed locally.

Hope this helps.
Posted by: cygnusx1 17 years ago
Orange Belt
0
Thanks for the reply. Unfortunately the Feature(s) that we need to call are to install the HKEY_CURRENT_USER settings for each user and are similarly named.
Posted by: aogilmor 17 years ago
9th Degree Black Belt
0
in that case you should control the per user components with a component, not a feature. If there is an advertised entry point for the app, the per user settings should cascade to HKCU. If not, you may want to use Active Setup, which has been discussed elsewhere in this forum. Ed Tippelt has a great page on Active Setup.
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