Serial number in mst?
When working with vendors msi, creating .mst using Install Tailor, what should I do when asked for serial number? The app has a unique serial number for each user, so obviously I don't want the same serial number rolling out to every user.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
WiseUser
18 years ago
Posted by:
sini
18 years ago
The WindowsInstaller object can be easily accessed from vbscript or visual basic either CreateObject("WindowsInstaller") or reference .msi dll(for visual basic). It allows to modify a msi database with normal sql commands. See the Microsofts WindowsInstallerSDK for examples.
If you want to change the PIDKEY of Office on every install then just construct a wrapper.exe which reads the next serial number from a .txt file and updates the .msi file. BUT remember, this means you can only run installations in single file.
To get around this issue the easiest way is to add a custom vbscript action to do this. Read the textfile and set the PIDKEY
Just to give you a kickoff:
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set serialtext = fso.OpenTextFile(session.property("SourceDir"),ForReading) 'Serialfile is in the same directory as the .msi
serial = serialtext.ReadLine
session.property("PIDKEY") = serial
If you want to change the PIDKEY of Office on every install then just construct a wrapper.exe which reads the next serial number from a .txt file and updates the .msi file. BUT remember, this means you can only run installations in single file.
To get around this issue the easiest way is to add a custom vbscript action to do this. Read the textfile and set the PIDKEY
Just to give you a kickoff:
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set serialtext = fso.OpenTextFile(session.property("SourceDir"),ForReading) 'Serialfile is in the same directory as the .msi
serial = serialtext.ReadLine
session.property("PIDKEY") = serial
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.