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.
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)
Please log in to answer
Posted by:
aogilmor
18 years ago
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.
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
18 years ago
Posted by:
aogilmor
18 years ago
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.
so that the conversation will remain readable.