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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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.
Answered 10/10/2006 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
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.
Answered 10/10/2006 by: cygnusx1
Orange Belt

Please log in to comment
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.
Answered 10/10/2006 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity