Adding a New Property to the property table of an msi through vbscript-automatically
Hi ,
I am new to vbscripting. And I a small scenario here.
I have obtained an msi after setupcapture(considering a legacy setup). After that, I want to add the standards for eg. ALLUSERS=1 .
I want to add the above mentioned property just by running the script. I dont want to add the property at run time or through a custom- action .
Its just that when I double click the vbscript(.vbs), it should automatically add the property. So that when i check the property table of the msi through ORCA, i should find the property present in the property table.
Is there any way to do this ? I m really new to scripting, so any kind of help is welcome. I am in desperate need of such a script.
hoping for some solution.
Thanks in advance
Pradeep
I am new to vbscripting. And I a small scenario here.
I have obtained an msi after setupcapture(considering a legacy setup). After that, I want to add the standards for eg. ALLUSERS=1 .
I want to add the above mentioned property just by running the script. I dont want to add the property at run time or through a custom- action .
Its just that when I double click the vbscript(.vbs), it should automatically add the property. So that when i check the property table of the msi through ORCA, i should find the property present in the property table.
Is there any way to do this ? I m really new to scripting, so any kind of help is welcome. I am in desperate need of such a script.
hoping for some solution.
Thanks in advance
Pradeep
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
Posted by:
dunnpy
14 years ago
It sounds like you need to setup a template with all of your required settings - especially if you are going to apply them to every MSI file you create.
Create the template and set your preferred packaging tool to use that template as standard - every package you create will have those settings then.
Or you could create a standards MST file to run with your MSIs that set your desired properties.
Hope this helps,
Dunnpy
Create the template and set your preferred packaging tool to use that template as standard - every package you create will have those settings then.
Or you could create a standards MST file to run with your MSIs that set your desired properties.
Hope this helps,
Dunnpy
Posted by:
Howyii
14 years ago
Posted by:
Howyii
14 years ago
If you are using WPS you can go to edit|Macros and create new or edit existing. Here is one that adds properties to the property table as an example. If you import the macros to a vendor msi, you can save the MSI with out compliling it and it will save the new properties.
This Macro checs to see if the property exists, if it does it changes it. If you just create the property you have to put something in the value, it cannot be empty.
Sub Property
strTable="Property"
strCol1="Property"
strValue1="INFO_Check"
Set TableRows= WTables(strTable).WRows
KeyFound=False
For Each Row In TableRows
RawString=Row.data(StrCol1)
If LCase(RawString)=LCase(StrValue1) Then
KeyFound=True
Exit For
End If
Next
If Not KeyFound Then
Prop34 = SetProperty("MsiHiddenProperties","WISE_SQL_CONN_STR")
Prop33 = SetProperty("Accept","Yes")
Prop32 = SetProperty("USERNAME","Blank")
Prop31 = SetProperty("COMPANYNAME","Blank")
Prop30 = SetProperty("ARPNOMODIFY","1")
Prop29 = SetProperty("ROOTDRIVE","C:\")
Prop28 = SetProperty("ALLUSERS","1")
Prop27 = SetProperty("REBOOT","ReallySuppress")
Prop2 = SetProperty("_WiseStatusMifSMSVer","2.0")
End If
End Sub
This Macro checs to see if the property exists, if it does it changes it. If you just create the property you have to put something in the value, it cannot be empty.
Sub Property
strTable="Property"
strCol1="Property"
strValue1="INFO_Check"
Set TableRows= WTables(strTable).WRows
KeyFound=False
For Each Row In TableRows
RawString=Row.data(StrCol1)
If LCase(RawString)=LCase(StrValue1) Then
KeyFound=True
Exit For
End If
Next
If Not KeyFound Then
Prop34 = SetProperty("MsiHiddenProperties","WISE_SQL_CONN_STR")
Prop33 = SetProperty("Accept","Yes")
Prop32 = SetProperty("USERNAME","Blank")
Prop31 = SetProperty("COMPANYNAME","Blank")
Prop30 = SetProperty("ARPNOMODIFY","1")
Prop29 = SetProperty("ROOTDRIVE","C:\")
Prop28 = SetProperty("ALLUSERS","1")
Prop27 = SetProperty("REBOOT","ReallySuppress")
Prop2 = SetProperty("_WiseStatusMifSMSVer","2.0")
End If
End Sub
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.