Use Install scripts to create a template out of one or
more scripts. Install scripts makes installation scripts available
for use in creating scripted installation actions in templates.
Provisioning supports batch file scripts, shell scripts, and many
other scripts. The Deploy image, Scripted install, and Inject
script actions use scripts like sysprep.inf or unattend.txt.
Install scripts can also insert variables into your scripts; for
example, a device name can be inserted into a sysprep.inf file.
To import installation scripts
Click Tools > Distribution > OS
Deployment.
On the toolbar, click the Install scripts
button.
Type the path and file name of the script in the
File name box, or click Browse, navigate to the
script, select it, and click OK.
Type a name for the script in the Script name
box. This name will display in the Install scripts list in
this dialog box.
It will also be displayed in the Installation scripts list
when you add a Scripted install action to a provisioning
template.
Type additional details about the script in the
Description box.
Select the target operating system in the Target
operating system list.
Select the Insert variables into script check
box if you want to swap out variables during the script import.
When variables are replaced, the ones in the table below will be
replaced automatically. Additional custom variables are supported,
and the values will be replaced when the template is run.
Click Import to place the script in the
Install scripts list.
To export an installation script
In the Install scripts dialog box, select the
script in the Install scripts list.
Click Export. Specify a file name and location
and click Save.
Using variables
Install scripts supports many key value pairs, such as:
Variable
Description
%ldHostname%
The host
name
%ldDeviceID%
GUID of
the device
If there is a key value pair in the win.inf file that already
exists as a user-defined variable, Install scripts replace it with
the user-defined variable.
To pass variables through an installation script as a variable
(not to be replaced by the provisioning process) encapsulate the
variable in double percent signs (for example,
%%variable%%).
Notes on using scripts
In Windows, a valid, active, formatted partition must
exist before the Scripted install action can occur.
The network installation source must have drivers for
the target device injected correctly or put into the OEM's PnP
driver path (for additional information, refer to the Microsoft
installation documentation).
Currently, only a command-line installation using
winnt32 works.
The file cmdlines.txt is used to append commands to
the final OS boot.
Currently, PXE/RIS is not supported.
If the installation fails, you can troubleshoot the
error by looking in the
\ManagementSuite\ldlogon\provisioning\config folder to see the
installation script with the variables replaced. This strategy also
applies to any time you modify a script, or use a script in the
Inject script or Deploy image actions.
The temporary directory used for provisioning is
%systemdrive%/ldprovisioning.
Linux installation issues
Linux scripted installation is only supported using PXE
boot.
When running a scripted install action for Linux, be aware that
each version of Linux checks that you are using the correct CD when
you begin an installation. Therefore, you will need a different
initrd and linux (vmlinuz) for every version of Linux.
The best way to do this is to copy the boot images from each CD
to the PXE and rename them. You should copy them to
\LANDesk\PXE\System\images\x86pc\undi\provlinux. For example, for
Red Hat 4, rename the files to initrd.rh4as and vmlinuz.rh4as, and
for Sles10, rename the files to initrd.sles10 and linux.sles10.
Then, when you create a scripted install action, use the correct
initrd.xxx and xxxlinux.xxx in the Scripted install template.
Linux install scripts support many key value pairs, such as:
Variable
Description
ldDNSDomain
The DNS
domain
ldInstallServer
The
install source server
ldInstallDir
The
installation directory. For example,
/storage/OS/linux/redhat/enterprise_4as/u3/i386/