I couldn't find anything specific on this subject so I'll give this a shot.

Because of licensing (we have multiple volume keys depending on vendor used), I am trying to figure out the best (read easiest, as one universal package w/o key) way to package/ deploy MS .msi applications that require a product key during the install w/o specifying the key during the install and requiring the end user to enter the key?

Any suggestions?

Thank you.
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


create an xml file such as this and call the following colde

I wrote this a few years ago so you should probably check syntax in code, I was too lazy to do it.

This is the basic no frills version

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>


sstrSerialNum = ISXscript

' Description: MSI XML configuration script.
' Function: Reads XML Configuration and modifies MSI's to suit
' Modification History:
' Author Date Version Changes
' ----------------- ----------- ------- ---------------------------------------
' Installpac Pty Ltd
' John McFadyen 20/04/2006 1.00 Created Script
' Note:
strSourcePath = Session.Property("SOURCEDIR") 'reads msi filename and path
strSourcePath = Mid(strSourcePath, 1, InstrRev(strSourcePath, "\")) 'strips filename leaving msipath

Set sobjWshShell = CreateObject("WScript.Shell")
set sobjNetwork = CreateObject("Wscript.Network") 'Create network object
Set sobjXMLDocument = CreateObject("Msxml2.DOMDocument") 'Creates XML document
Set sobjWMIService = GetObject("winmgmts:\\.\root\cimv2")
set sobjArgs = Wscript.Arguments
Set scolItems = sobjWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL")
sobjXMLDocument.Async = False
sobjXMLDocument.resolveExternals = False
sobjXMLDocument.Load(strSourcePath & "scripts\Serials.xml") 'Loads XML file
sstrUserDomain = sobjNetwork.UserDomain 'Determines users domain
sstrComputername = sobjNetwork.Computername

For Each objItem In scolItems
sstrFQDN = objItem.Domain

strItem = GetXMLChildNodes(sobjXMLDocument, "SERIALNUMS")
' Function: GetXMLAttribute (Reads attributes from XML)
' John McFadyen
Function GetXMLAttribute (byref sobjXMLDocument, strNode, strAttributeName)
'On Error Resume Next
Dim objDocumentElements, objNode, strAttributeResult
Set objDocumentElements = sobjXMLDocument.documentElement
Set objNode = objDocumentElements.selectSingleNode(strNode)
GetXMLAttribute = objNode.GetAttribute(strAttributeName)
Session.Property(strAttributeName) = GetXMLAttribute
' msgbox strAttributeName & " " & session.Property(strAttributeName)

End Function
' Function: GetXMLChildNodes (Enumerates child nodes from XML parent)
' John McFadyen
Function GetXMLChildNodes (byref sobjXMLDocument, strNode)
'On Error Resume Next
Dim objDocumentElements, objNode, strAttributeResult
Set objDocumentElements = sobjXMLDocument.documentElement
Set objParentNode = objDocumentElements.selectSingleNode(strNode)
For Each objNode in objParentNode.childNodes
' msgbox "NodeName: " & objNode.NodeName & " " & "NodeText: " & objNode.Text
if objNode.NodeName = sstrComputername then
'This property may change depending on the app your using
'please check prior to running this script
Session.Property(sstrSerialNum) = objNode.Text
msgbox "Seems like your machine name is not licensed for this software" & vbcrlf _
& "Get your machine licensed and reinstall this application. " & vbcrlf _
& "This installation will now quit"
session.property("TERMINATE") = "YES"
end if
End Function
Answered 11/10/2008 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity