I have an application which requires several different variables added depending on the machine, such as Machine Name, or different Server Addresses, does anyone know if its possible to set up an answer file and how using Wise Package Studio?

Thanks for your advice in advance.

Craig
0 Comments   [ + ] Show Comments

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.

Answers

0
If you have an MSI from the vendor (remembering that many SETUP.EXE stubs actually extract and run MSIs "under the hood" - look in the %TEMP% folder when you get the 'Welcome' dialog), then your "answer" file is called a transform. To go into detail here about how to create a transform would take too long. Instead, let me point you in the direction of setting properties and using conditions.

If you want an answer file for an EXE, these are generally recorded using the same SETUP.EXE stub as you would use to install. Generally speaking, these will be authored to take a switch, normally '/R', followed by the path to and name of the answer file. There's a ton of stuff on the web about that. Search for something like 'RECORD +SETUP.ISS'
Answered 06/26/2008 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: VBScab
If you want an answer file for an EXE, these are generally recorded using the same SETUP.EXE stub as you would use to install. Generally speaking, these will be authored to take a switch, normally '/R', followed by the path to and name of the answer file. There's a ton of stuff on the web about that. Search for something like 'RECORD +SETUP.ISS'


For the benefit of the OP (and as it's often a follow-on question), it's perhaps worth noting here that when you get around to considering uninstallation, a separate uninstall answer file may need to be recorded if you want to uninstall your EXE package silently.

Regards,

Spartacus

Regards
Answered 06/26/2008 by: spartacus
Black Belt

Please log in to comment
0
Yup, good point, Graham. Nice catch.
Answered 06/26/2008 by: VBScab
Red Belt

Please log in to comment
0
heres a solution i use regularly for a similar situation. uses xml files as input files. in this case to push in serial numbers based on machine names.

it wouldn't be too much to tweak it to work with other arguments etc.



sstrSerialNum = ISXscript

'******************************************************************************
' Filename: CONFIGSERIALNUMSBYMACHINE.VBS
'
' 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
Next

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
else
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
Next
End Function
Answered 06/30/2008 by: jmcfadyen
Fifth Degree Black Belt

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