Importing installation scripts

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
  1. Click Tools > Distribution > OS Deployment.
  2. On the toolbar, click the Install scripts button.
  3. 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.
  4. 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.
  5. Type additional details about the script in the Description box.
  6. Select the target operating system in the Target operating system list.
  7. 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.
  8. Click Import to place the script in the Install scripts list.
To export an installation script
  1. In the Install scripts dialog box, select the script in the Install scripts list.
  2. 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

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/
ldNameserver1 DNS server 1
ldNameserver2 DNS server 2