The sample script in this section installs the program in a typical configuration. To make it easy to copy this sample script and substitute your own information, the same names are used throughout for variable items. The log file name is based on the product being installed. You can either use the log file name in the script or change it to something else.
Serial number prefix: 123
Serial number: 12345678
First name: Your First Name
Last name: Your Last Name
Organization: Your Company Name
A sample script for a silent installation of this program uses the syntax shown in this section.
Scripted installation for AutoCAD Land Desktop 2009
' Scripted installation for AutoCAD Land Desktop 2009
option explicit
'
' Create variables
dim x64bit
dim shell
dim productType
dim featuresToInstall
dim strADSKFirstName
dim strADSKLastName
dim strADSKOrganization
dim strADSKSercirity
dim strADSKSerialIsvalid
dim strADSKAccept
dim strADSKEula
dim strADSKReInstall
dim strADSKRemove
dim strADSKSNPrefix
dim strADSKSNNumber
dim strInstallLevel
dim strACADStandaloneNetworkType
dim strADSKLicenseServerType
dim strADSKLicenseType
dim strADSKServerFmtPath
dim strADSKServerPath
dim strADSKServerHostID
dim strADSKPath
dim strSourcePath
dim strAdditionalStuff
'
' Script initialization
Set shell = CreateObject("WScript.Shell")
productType = "acad"
'
' Name and Organization information
strADSKFirstName = "Your First Name"
strADSKLastName = "Your Last Name"
strADSKOrganization = "Your Organization Name"
'
' Serial Number information
strADSKSNPrefix = "123"
strADSKSNNumber = "45678901"
'
' Source to install from (e.g. D: is assumed to be Install Media)
strSourcePath = "D:\"
' Destination to install to
strADSKPath = Shell.ExpandEnvironmentStrings("%ProgramFiles%") + "\AutoCAD Land Desktop 2009"
'
' Features to install
' ACS - AutoCAD Land Desktop Samples
' CADStandards - CAD Standards
' ContentSearch - Content Search
' Database - Database (DBCONNECT)
' DCS - DesignCenter Samples
' DigSig - Digital Signatures
' Dictionaries - Dictionaries
' DrawingEncryption - Drawing Encryption
' Express_Tools - Express Tools
' Fonts - Fonts
' Impression - Autodesk Impression Toolbar
' Materials - Materials Library
' Migrate - Migrate Custom Settings
' NFW - New Features Workshop
' PLM - Portable License Utility
' RefMan - Reference Manager
' System_Files - Required system files (must be installed by default- in this script)
' TM - Texture Maps
' VBA - Visual Basic for Applications
' VLS - Visual LISP Samples
' VLT - Visual LISP Tutorials
'
' Sample is below - Note the leading comma
featuresToInstall = ",DigSig,TM,CADStandards,ContentSearch,Database,Dictionaries,DrawingEncryption,Express_Tools,Fonts,NFW,Migrate,RefMan,Samples,ACS,DCS,VBA,Materials,PLM,VLS,VLT"
strInstallLevel=3 ' 5 installs everything - 3 installs typical - 0 uses featuresToInstall
'''''' Uncomment the relevant version of your installation - Default is Standalone
' For Standalone
RunStandaloneInstall()
'
' For Single Network License Server
'RunSingleLicenseServerInstall()
'
' For Redundant Network License Servers
'RunRedundantLicenseServerInstall()
'
' For Distributed Network License Servers
'RunDistributedLicenseServerInstall()
'
' End of Script
Wscript.quit()
'
Function RunStandaloneInstall
shell.run DefaultCommand(),2,1
end function
'
Function RunSingleLicenseServerInstall
' Update with the correct information for the license server
strACADStandaloneNetworkType = "3"
strADSKLicenseServerType = "Single Server License"
strADSKLicenseType = "Network License"
strADSKServerPath = "myFlexServer"
' HOSTID or MAC address
strADSKServerHOSTID = "000000000000"
'
' Consolidate the two values
strADSKServerPath = strADSKServerPath & " " & strADSKServerHOSTID
shell.run MakeCommand(),2,1
end function
'
Function RunRedundantLicenseServerInstall
' Update with the correct information for the license servers
strACADStandaloneNetworkType = "3"
strADSKLicenseServerType = "Redundant Server License"
strADSKLicenseType = "Network License"
'
' Format is SERVERNAME1 MACADDR1 PORT1;SERVERNAME2 MACADDR2 PORT2; SERVERNAME3 MACADDR3 PORT3; - Only 3 permitted for redundant servers
strADSKServerPath = " myflex1 000000000000 27005; myflex2 000000000000 27005; myflex3 000000000000 27005;"
shell.run MakeCommand(),2,1
end function
'
Function RunDistributedLicenseServerInstall
' Update with the correct information for the license servers
strACADStandaloneNetworkType = "3"
strADSKLicenseServerType = "Distributed Server License"
strADSKLicenseType = "Network License"
'
' Format is @SERVERNAME1;SERVERNAME2;SERVERNAME3;
strADSKServerPath = "@ myFlexServer;@ myFlexServer2;@ myFlexServer3;"
'
shell.run MakeCommand() & "ACAD_LICENSESERVER_DISTRIBUTED=1",2,1
end function
'
Function DefaultCommand
dim retString
' /q for silent install ' /c [key] override parameters for the key
retString = """" & strSourcePath & "D:\setup.exe" & """" & " /t /q /c " & productType & ": "
retString = retString & "INSTALLDIR=" & """" & strADSKPath & """" & " "
retString = retString & "ACADSERIALPREFIX=" & strADSKSNPrefix & " "
retString = retString & "ACADSERIALNUMBER=" & strADSKSNNumber & " "
retString = retString & "ACADFIRSTNAME=" & """" & strADSKFirstName & """" & " "
retString = retString & "ACADLASTNAME=" & """" & strADSKLastName & """" & " "
retString = retString & "ACADORGANIZATION=" & """" & strADSKOrganization & """" & " "
if strInstallLevel = 0 then
retString = retString & "ADDLOCAL=" & """" & "System_Files" & featuresToInstall & """" & " "
else
retString = retString & "InstallLevel=" & strInstallLevel & " "
DefaultCommand = retString & " "
end if
DefaultCommand = retString & " "
end function
'
Function MakeCommand
dim retString
retString = DefaultCommand() & " "
retString = retString & "ACADSTANDALONENETWORKTYPE=" & """" & strACADStandaloneNetworkType & """" & " "
retString = retString & "ACADLICENSESERVERTYPE=" & """" & strADSKLicenseServerType & """" & " "
retString = retString & "ACADLICENSETYPE=" & """" & strADSKLicenseType & """" & " "
retString = retString & "ACADSERVERPATH=" & """" & strADSKServerPath & """" & " "
MakeCommand = retString
end function