A Sample Installation Script
 
 
 

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 2008

' Scripted installation for AutoCAD 2008
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")
x64bit = false		 ' change to true if this is AutoCAD 2008 x64
productType = "acad"
strInstallLevel=3	' 5 installs everything 3 installs typical
' 
' Name and Organization information 
strADSKFirstName = "Your First Name" 
strADSKLastName = "Your Last Name" 
strADSKOrganization = "Your Organization Name" 
' 
' Serial Number information 
strADSKSNPrefix = "123" 
strADSKSNNumber = "12345678" 
' 
' Source to install from (e.g. D: is assumed to be Install Media) 
strSourcePath = "d:\" 
' 
' Destination to install to 
strADSKPath = Shell.ExpandEnvironmentStrings("%ProgramFiles%")  + "\AutoCAD 2008" 
' 
' Features to install 
' ACS - AutoCAD Samples 
' CADStandards - CAD Standards 
' Database - Database (DBCONNECT) 
' DCS - DesignCenter Samples 
' DigSig - Digital Signatures 
' Dictionaries - Dictionaries 
' DrawingEncryption - Drawing Encryption 
' Express_Tools - Express Tools 
' Fonts - Fonts 
' Impression - Autodesk Impression Toolbar (NOT in AutoCAD 2008 64 bit) 
' Materials - Materials Library 
' Migrate - Migrate Custom Settings 
' NFW - New Features Workshop 
' PLM - Portable License Utility 
' RefMan - Reference Manager 
' System_Files - Required system files (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,Database,Dictionaries,DrawingEncryption,Express_Tools,Fonts,NFW,Migrate,RefMan,Samples,ACS,DCS,VBA,Materials,PLM,VLS,VLT" 
if not x64bit then 
' To add Autodesk Impression to the install 
featuresToInstall = featuresToInstall & ",Impression" 
strAdditionalStuff = "ACADSHOWIMPR=" & """" & "1" & """" 
end if 
'''''' 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 = "001122334455" 
' 
' 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 = " myFlexServer 001122334455 27005; myFlexServer2 006622334455 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 & "\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 & """" & " " 
retString = retString & "InstallLevel=" & strInstallLevel & " " 
' retString = retString & "ADSK_LAUNCH_MODE=Standalone"  & " " 
if strInstallLevel = 3 then 
retString = retString & "ADDLOCAL=" & """" & "System_Files" & featuresToInstall & """" & " " 
end if 
retString = retString & strAdditionalStuff ' Specifically for Impression Toolbar 
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