CallScript
Run Windows Script
Definition
Use this command to run a Windows script with a scripting engine.
The Installer passes the control for running the script to a scripting
engine. When the scripting engine is finished running the Windows script,
the Installer continues to execute the eScript.
The Windows scripts the Installer runs when the CallScript command is used, contain only the default
scripting commands for each scripting language. Ivanti DSM does not
support additional objects or methods available through the Windows Script Host,
for example WshShell. By using,
for example, WScript.Shell, you
can access these objects.
Settings
Input
- Script
file
Please enter the name of the script file you want to run through a scripting engine.
The Installer recognizes the scripting language used by its file extension:
- VB Script (Visual Basic Script). File extension: .VBS
- JScript (extended JavaScript). File extension: .JS
- Perl Script. File extension: .PL
- PowerShell. File extension: .PS1 - Click the Edit button to open and edit the script in the
Editor.
The default editor is Notepad (NOTEPAD.EXE). If you want, you can define another editor by using the following registry value (string):
Key: HKCU\Software\NetSupport\NetInstall\
Name: TextEditor
When running the Windows script, CallScript does not support parameters as sample.vbs -s1000 -mALL -i -oa.out However, you can define the required parameters before calling the CallScript command and then store the variables in the Windows script using the NiGetVar command.
If you do not save the script file in the package directory, it will not be distributed.
Options
Execution in a x64 environment
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.