Network Install Scripts
Network Install Scripts
White Paper
www.autodesk.com 1
Use Scripts to Install AutoCAD-Based Products on a Network
' Using a UNC path for the location of the MSI install file.
PathOfMSI = "\\acme\apps\acad.msi"
' Creating a variable to store an installation location with a long file name.
dim strADSKPath
strADSKPath = "c:\Autodesk\AutoCAD 2002"
www.autodesk.com 2
Use Scripts to Install AutoCAD-Based Products on a Network
Windows 98 and Windows NT 4.0: The preceding sample script uses variables in order
to accommodate long file names (or other items with spaces). Scripts such as this one do
not run on Windows 98 and Windows NT 4.0. To use an installation script successfully on
Windows 98 and Windows NT 4.0, avoid using spaces in folder names, file names, and other
items, and use a simple script like the one below. A script like the sample below uses the
same switches and flags, but the script itself must be all on one line.
msiexec /i \\acme\apps\autocad2002\acad.msi /l*v acadinstall.log /qb
INSTALLDIR=c:\AutoCAD2002 ACAD_SILENT_LICENSE=YES ACADSERIALPREFIX=123
ACADSERIALNUMBER=12345678 ACADSERIALKEY=123ABC INSTALLLEVEL=3
Explanation of the Sample Installation Script
Each line of the script must end with a plus sign. The lines above the shell.Run line are
setting up variables. The first variable uses a UNC path for the location of the MSI file rather
than a mapped drive letter so that it is not necessary for each user to have the same
mapped drive letter on a server. To use a mapped drive letter in the script, change \\acme
to the actual share on the server, for example, PathOFMSI="J:\acme\apps\acad.msi".
The next sections set up variables. Variables make it possible to use long file names and
other strings with spaces in them in the script.
The first section of the script itself begins with the VBScript command shell.Run that runs
the script, the command msiexec, and the /i (install) switch:
shell.Run "msiexec /i " + _
The next line is the variable specifying the location of the MSI file for the product to install:
PathOfMSI + " " + _
The next line uses the switch /l and the flag *v to specify creation of a log file each time
the script is run that includes all available information. You can use any name for the log
file, and you can store it wherever you like by specifying a path name; the default location
is the folder from which the script is running.
"/l*v acadinstall.log" + " " + _
The next line uses a variable to specify where to install the product:
"INSTALLDIR=""" & strADSKPath & """" + " " + _
The next line uses a switch to specify silent installation:
"/qb ACAD_SILENT_LICENSE=YES" + " " + _
The next lines use switches to fill in personalization information. The company and dealer
lines use variables for names that include spaces:
"ACADSERIALPREFIX=111" + " " + _
"ACADSERIALNUMBER=12345678" + " " + _
"ACADSERIALKEY=ABCXYZ" + " " + _
"ACADFIRSTNAME=John" + " " + _
"ACADLASTNAME=Doe" + " " + _
"ACADORGANIZATION=""" & strADSKName & """" + " " + _
"ACADDEALERPHONE=800-123-4567" + " " + _
"ACADDEALER=""" & strADSKCompany & """" + " " + _
"INSTALLLEVEL=3"
When you save the script, use the file extension .vbs, and be sure to give the file a name
that tells you what product you’re installing.
www.autodesk.com 3
Use Scripts to Install AutoCAD-Based Products on a Network
Switches
The following table lists all of the switches relevant to installation, including the /x switch,
which is used to uninstall.
Switch Description
/i Installs or configures a product.
/x Uninstalls a product.
/l Creates a log file and specifies the path to the log file; flags
specify what is included in the log file. (See the log file flags
table.)
/q Sets the user interface level using flags. (See the UI flags table.)
INSTALLDIR= Specifies the location to install the AutoCAD product.
ACAD_SILENT_LICENSE=YES Sets the silent license agreement.
ACADSERIALPREFIX= Specifies the numbers that precede the hyphen in the serial
number.
ACADSERIALNUMBER= Specifies the serial number.
ACADSERIALKEY= Specifies the CD key number.
INSTALLLEVEL= Specifies the type of installation: 1=Compact, 3=Typical, 5=Full
ACADFIRSTNAME= Specifies the first name personalization.
ACADLASTNAME= Specifies the last name personalization.
ACADORGANIZATION= Specifies the company name.
ACADDEALER= Specifies the dealer name.
ACADDEALERPHONE= Specifies the dealer phone number.
Log Files
You can specify what information to log and how the log file is constructed by using the
flags in the following table. The plus sign flag appends the log information to an existing file
rather than starting a new file each time the script is run.
Log file flag Description
i Status messages
w Nonfatal warnings
e All error messages
a Startup of actions
r Action-specific records
u User requests
c Initial UI parameters
m Out-of-memory or fatal exit message
o Out-of-disk-space messages
p Terminal properties
v Verbose output
+ Information appended to existing file
! Each line flushed to the log
* Wildcard: All information except verbose output
logged; to include verbose output, use /l*v
www.autodesk.com 4
Use Scripts to Install AutoCAD-Based Products on a Network
Flag Component
VVE Volo View Express
ACS AutoCAD Samples
Batch_Plotting Batch Plotting
Database Database (DBCONNECT)
DCS Design Center Samples
Dictionaries Dictionaries
AmericanEnglish_Dictionary American English Dictionary
Fonts Fonts
French_Canadian_Dictionary French Canadian Dictionary
Samples Sample files
TM Texture Maps
Tutorials Tutorials
VBA Visual Basic
VLS Visual LISP Samples
VLT Visual LISP Tutorials
X1 CAD Standards Extension
X2 XML/Data Extension
www.autodesk.com 5
Use Scripts to Install AutoCAD-Based Products on a Network
point to the MSI files in your scripts. Copy the product CD to that directory. For example,
copy the AutoCAD 2002 CD to the acad2002 directory. You may want to also create
directories for service packs, extensions, and your own customization tools.
You can use any of the following methods to run an installation script:
• Run the script manually at each individual workstation. To run the installation, you
can paste the script into the Run dialog box or run it from the DOS prompt.
• Send an email with the UNC path to each user that you want to run the script. To run
the script, the user follows your instructions.
• Email the script to each user with instructions for use.
• Set up the script so that it runs on login.
Sample Scripts
The sample scripts below install AutoCAD in various configurations. To make it easy to copy
these 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 name in the script or change it to something else.
Domain name: acme
Share name: apps
Installation directory: c:\Autodesk\AutoCAD 2002
Serial number prefix: 111
Serial number: 12345678
CD key: abcxyz
First name: John
Last name: Doe
Organization: ABC Graphics
Dealer: Autodesk
Telephone number: 800-123-4567
Sample Script 1: Custom Installation
' Custom installation of program files only.
' Using a UNC path for the location of the MSI install file.
PathOfMSI = "\\acme\apps\acad.msi"
' Creating a variable to store an installation location with a long file name.
dim strADSKPath
strADSKPath = "c:\Autodesk\AutoCAD 2002"
' Creating a variable to store a company name with a long file name.
dim strADSKName
strADSKName = "ABC Graphics"
www.autodesk.com 6
Use Scripts to Install AutoCAD-Based Products on a Network
"REMOVE=VVE,ACS,Batch_Plotting,Database,DCS,Dictionaries,AmericanEnglish_Dict
ionary,Fonts,French_Canadian_Dictionary,Samples,TM,Tutorials,VBA,VLS,VLT,X1,X
2"
' Using a UNC path for the location of the MSI install file.
PathOfMSI = "\\acme\apps\acad.msi"
' Creating a variable to store an installation location with a long file name.
dim strADSKPath
strADSKPath = "c:\Autodesk\AutoCAD 2002"
' Creating a variable to store a company name with a long file name.
dim strADSKName
strADSKName = "ABC Graphics"
www.autodesk.com 7
Use Scripts to Install AutoCAD-Based Products on a Network
' Using a UNC path for the location of the MSI install file.
PathOfMSI = "\\acme\apps\acad.msi"
' Creating a variable to store an installation location with a long file name.
dim strADSKPath
strADSKPath = "c:\Autodesk\AutoCAD 2002"
' Creating a variable to store a company name with a long file name.
dim strADSKName
strADSKName = "ABC Graphics"
' Using a UNC path for the location of the MSI install file.
PathOfMSI = "\\acme\apps\acad.msi"
' Creating a variable to store an installation location with a long file name.
www.autodesk.com 8
Use Scripts to Install AutoCAD-Based Products on a Network
dim strADSKPath
strADSKPath = "c:\Autodesk\AutoCAD 2002"
' Creating a variable to store a company name with a long file name.
dim strADSKName
strADSKName = "ABC Graphics"
Sample Script 5: Installation of the CAD Standards Extension for AutoCAD 2000i
' Installation of AutoCAD 2000i CAD Standards Extension.
Autodesk, Inc.
111 McInnis Parkway
San Rafael, CA 94903
USA
Autodesk, AutoCAD, AutoCAD LT, and Mechanical Desktop are either registered trademarks or trademarks of Autodesk, Inc., in the
USA and other countries. All other brand names, product names, or trademarks belong to their respective holders.
www.autodesk.com 9