Create a new script
Introduction
The following is a description of how to create a new script in CapaInstaller OSD.
Step | Action |
1 | Click File menu, click New and then _Create new script_. |
2 | The following window appears. |
3 | Choose the relevant script type and click OK. |
4 | Right-click and click Edit Script. Enter the script contents. |
5 | Click OK. |
Scripting
During script creation the following registry keys can be read from the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\CapaSystems\CapaInstaller\OSD. |
Read about> ImageOSType Variables
Values | Description | |||||||||||||||||||
IsLocalReinstallation | Reserved for future use | |||||||||||||||||||
AlternativeConfigPath | Use specified file to read startup values, this will force OSD to read values from alternate file instead of using osdloader.ini | |||||||||||||||||||
OSDUNCPath | The path where OSDGUI.exe was found | |||||||||||||||||||
NewComputerName | Contains the value to be used as the name of the client. During the deployment, the client will have a randomly generated name, which is stored in the variable COMPUTERNAME. | |||||||||||||||||||
ImageName | The name of the image be applied. | |||||||||||||||||||
DiskConfig | The disk configuration applied to the client. Refer to the help topic “How to partition the client disc during OS deployment” for a description of the format used. | |||||||||||||||||||
DiskIndex | If a machine contains more than one disc, this value will shift the deployment focus to the discindex selected, OSD will not change this value automatically | |||||||||||||||||||
IPAddress | The IP address currently assigned to the client. | |||||||||||||||||||
BootServer | The server from which OSD is running. If this value is empty, the deployment process is running from a DVD/CD or a bootable USB device. | |||||||||||||||||||
ModelName | The filtered model ID pulled from SMBIOS. This is the value that determines which drivers will be added to the client. | |||||||||||||||||||
MachineType | This value indicates if the client is a laptop or a workstation. | |||||||||||||||||||
PCType | This variable holds the installation type. | |||||||||||||||||||
SkipGUI | Set to true to suppress the user input form | |||||||||||||||||||
OSDGUIRootDrive | The drive letter where OSDGUI was found | |||||||||||||||||||
DeployToDrive | The drive letter where the image is being deployed | |||||||||||||||||||
ImageOSType | The type of OS in the selected image, possible values are: Legacy OS values>
OS values>
In case the OSType is not detected correctly the values will be set to Undetected or Unknown | |||||||||||||||||||
IsReinstallation | Indicates If OSD is performing a reinstallation | |||||||||||||||||||
DisableCMSClient-Installation | Set this value to True to prevent OSD from deploying a CMS agent automatically | |||||||||||||||||||
WindowsSystemRoot | Windows root of the deployed image | |||||||||||||||||||
CustomMessage | When a script is running OSD will display this value as the state message on the UI |
Scripts
Script | Description |
PreGUIScript | This script runs before OSDGUI shows the user input form. To suppress this form use the Registry value SkipGUI. |
PreDiskPartScript | This script runs immediately after the user clicks Install to activate the deployment process. Any further user interaction should be handled using this script. All data written to x: during the deployment process will be discarded when rebooting. |
PreImageScript | This scripts runs after the partitioning operation is complete, but before any data is transferred to the new file system. |
PreDriverCopyScript | This scripts runs before any drivers are copied onto the client. |
PrePatchScript | This scripts runs before any changes are made to the client registry or sysprep files. |
PreBootScript | This scripts runs as the final part of the deployment process. |
PostInstallScript | This script runs as part of the minisetup process |
OSDCustomLib | This file can contain custom functions to be included into scripts. |
Supported script types are .vbs, .wsf and .cis.
Tip! |