Application does not self repair.
Hi,
We are facing strange problem while packaging one small application.
In this application we are using one merge module. [Microsoft_VC90_CRT_x86.msm]
Problem: If we add this merge module, then our application stops repairing. We use below vbscript which is in our template, and in this vbscript we are setting REINSTALLMODE=UMS, and in property table we are setting REINSTALLMODE=OMUS.
Solutions:
1) If we are putting OMUS in place of UMS in vbscript, then our application starts repairing, even if merge module is present.
2) If we delete merge module then also application starts repairing, and we do not have to edit vbscript.
We are not sure, why this is happening. We are not able to find out the technical reason.
Please guide.
We are facing strange problem while packaging one small application.
In this application we are using one merge module. [Microsoft_VC90_CRT_x86.msm]
Problem: If we add this merge module, then our application stops repairing. We use below vbscript which is in our template, and in this vbscript we are setting REINSTALLMODE=UMS, and in property table we are setting REINSTALLMODE=OMUS.
Solutions:
1) If we are putting OMUS in place of UMS in vbscript, then our application starts repairing, even if merge module is present.
2) If we delete merge module then also application starts repairing, and we do not have to edit vbscript.
We are not sure, why this is happening. We are not able to find out the technical reason.
Please guide.
set activeDB = Database
Set viewComponents = activeDB.OpenView("SELECT ComponentId, Attributes FROM Component WHERE Attributes > 0")
viewComponents.Execute
Set retrieveComponent = viewComponents.Fetch
Do Until (retrieveComponent Is Nothing)
strComponentID = retrieveComponent.StringData(1)
strAttributes = retrieveComponent.IntegerData(2)
If (strAttributes And 4) Then
strComponentPath = Installer.ComponentPath(Property("ProductCode"), strComponentID)
If strComponentPath = "" Then
Property("REINSTALLMODE")="ums"
Exit Do
End If
End If
Set retrieveComponent = viewComponents.Fetch
Loop
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
pjgeutjens
14 years ago
Hey guys,
trying to fathom what exactly your script does. If I interpret it correctly it sets REINSTALLMODE to "ums" (no more file level repairs?) if it finds a component with a registry keypath
if my assumption about the change in the property disabling file level actions during repair is correct, this might explain the differences in behaviour. As a plan of action I'd suggest adding some logging statements to the script to identify exactly which components are triggering the change of the REINSTALLMODE property
This should allow you to drill down closer to the cause of your problems.
Hope you get there
PJ
trying to fathom what exactly your script does. If I interpret it correctly it sets REINSTALLMODE to "ums" (no more file level repairs?) if it finds a component with a registry keypath
if my assumption about the change in the property disabling file level actions during repair is correct, this might explain the differences in behaviour. As a plan of action I'd suggest adding some logging statements to the script to identify exactly which components are triggering the change of the REINSTALLMODE property
This should allow you to drill down closer to the cause of your problems.
Hope you get there
PJ
Posted by:
anonymous_9363
14 years ago
Where in the relevant sequence does this property-setting Custom Action feature?
Some awkward-looking code there, BTW. The 2 occurences of the line 'Set retrieveComponent = viewComponents.Fetch' are particularly baffling. Switch to a different loop mechanism, maybe something like
Also, I prefer to explicitly refer to objects in use so, rather than
Some awkward-looking code there, BTW. The 2 occurences of the line 'Set retrieveComponent = viewComponents.Fetch' are particularly baffling. Switch to a different loop mechanism, maybe something like
Do
Set retrieveComponent = viewComponents.Fetch
Loop Until retrieveComponent = Nothing
orDo
Set retrieveComponent = viewComponents.Fetch
Loop While Not (retrieveComponent = Nothing)
Also, I prefer to explicitly refer to objects in use so, rather than
Set activeDb = Database
Property("REINSTALLMODE")="UMS"
I'd have Set activeDb = Session.Database
Session.Property("REINSTALLMODE")="UMS"
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.