Hello !
I would like to set properties in VB scripts.
Here you can see my VB code :
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Set properties using VB scripts
Started by
babric
, Jul 27 2005 16:02
3 replies to this topic
Posted 27 July 2005 - 16:02
CODE |
If Msgbox("Do you want to uninstall this product ?, vbYesNo + vbDefaultButton2 + vbExclamation,"Title")=VbYes Then 'Here I would like to set the property UNINSTALL to "0" ' I tried <<<Session.Property("UNINSTALL") = 0>>> but it doesn't seem to work Else 'Here I would like to set the property UNINSTALL to "1" ' I tried <<<Session.Property("UNINSTALL") = 1>>> but it doesn't seem to work End If |
Do you have a solution ?
Thanks !
Posted 28 July 2005 - 14:01
That should work, assuming that you care calling this script as a custom action from inside your setup. What makes you think it doesn#t work (what are the symptoms)?
Stefan Krüger
InstallSite.org twitter facebook
Posted 28 July 2005 - 14:22
Custom Action Table :
Action :
UneCustom
Type :
38
Source :
Target :
If Msgbox("Do you want to uninstall this product ?", vbYesNo + vbDefaultButton2 + vbExclamation,"Title")=VbYes Then
Session.Property("UNINSTALL") = 0
Else
Session.Property("UNINSTALL") = 1
End If
Sequence :
After Costinitialize (InstallUISequence Table)
When I run it "alone", I see the dialog box, and when I push a button, Ihave a <Required Object> "Session" error (that's normal)
When I run it in the msi package, I have a 1720 error (Script required can't be run)
I will try to add the vbs in the binary table...
EDIT :
Adding it in the binary table, I can see the dialog box, and when I push a button, I have the 1720 error...
Action :
UneCustom
Type :
38
Source :
Target :
If Msgbox("Do you want to uninstall this product ?", vbYesNo + vbDefaultButton2 + vbExclamation,"Title")=VbYes Then
Session.Property("UNINSTALL") = 0
Else
Session.Property("UNINSTALL") = 1
End If
Sequence :
After Costinitialize (InstallUISequence Table)
When I run it "alone", I see the dialog box, and when I push a button, Ihave a <Required Object> "Session" error (that's normal)
When I run it in the msi package, I have a 1720 error (Script required can't be run)
I will try to add the vbs in the binary table...
EDIT :
Adding it in the binary table, I can see the dialog box, and when I push a button, I have the 1720 error...
Edited by babric, 28 July 2005 - 14:29.
Posted 07 September 2005 - 13:16
You should try: Property("UNINSTALL") = "0" ....
The value assigned to a property in a custom action must be a string value.
The value assigned to a property in a custom action must be a string value.