Classifying  Commands in the Script Editor

With the Script Editor you can classify any command or add a specific execution option to it.
Commands are automatically classified when they are inserted. You can customize this classification with the respective menu items.
In general, execution options are not specified automatically but can be specified manually, depending on the respective command.

By default, the commands are automatically assigned to one of the following classes:

Computer-related command
Execution under user account
Logging in HKEY_LOCAL_MACHINE

User-related command
Execution under user account
Logging in HKEY_CURRENT_USER

Service-executed, computer-related command
Execution with DSM Runtime Service
Logging in HKEY_LOCAL_MACHINE

The fourth possible command classification user-related, execution via service is only required in special cases, e.g. to copy the profile of a user into an area where the user has no write access. This classification can only be made manually.

Note the following:
A CreateLink command that creates a link in a global program folder is automatically classified as a service-executed (computer-related) command.

If you edit the command, the classification is not adapted: although you deactivate the checkbox global program folders in a CreateLink command, the command remains classified as a service-executed (computer-related) command.
To correct the classification …
- delete the command and reinsert it, or
- select the command Reset Command Classification in the DSMC's "Script" menu.
However, this reclassifies all the commands in a package.

Execution options

In addition to the command classification, the following execution options are available:

Deactivates the file redirection on x64 systems

Continues script inspite of errors

Stop script on error

The execution options refer to the following:

  • Deactivates the file redirection on x64 systems
    For reasons of compatibilty, Ivanti DSM maps file and registry access to the default storage location for 32 bit applications (provided that the storage location differs from that of 64-bit applications). File access: whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to %windir%\SysWOW64. Registry commands: when accessing HKEY_LOCAL_MACHINE\SOFTWARE the calls are redirected to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. The x64-switch stops this redirection of file and registry accesses when running the script command on a x64 computer; the eScript command runs on the specified path. CallScript command: the script runs in a 64-bit process.
    This execution option is only available for some commands.
  • Continue script despite error
    Use this execution option if you want to execute the complete script even if there was an error when executing a command. The command is clearly marked with an /X in the extended Script Editor.
    The error messages (Last Error) can be read out with the following DSM variables:
    _LAST_ERROR_VALUE: numeric (decimal) value of the error code that lead up to the error.
    _LAST_ERROR_VALUE_HEX: numeric (hexadecimal) value of the error code
    _LAST_ERROR: error message or description of the error code.
  • Stop script on error
    Use this execution option if you want to stop the complete script if an error occurs while executing the command. The command is clearly marked with an /O in the extended Script Editor. The error messages (Last  Error) can be read out with the same DSM variable that is explained in the option Continue script despite error.
    This execution option is only available for some commands.
    This also applies if you set the package property Error handling to Always terminate script on error (a default setting for new packages). In this case, the Script Editor does not provide this execution option and you cannot change it for an individual command.

If you enable the package property Error handling, you can use the option Continue script despite error for some commands. The options Stop script on error and Continue script despite error exclude one another.