Invoke-Script
Invoke-Script
Calls an external script that is processed by a script engine. Only when the external script is finished, the script itself is continued.
Windows scripts that are called via Invoke-Script have the standard features of the respective script language. Objects and methods additionally provided by the Windows Script Host, e.g. WshShell, are not supported. These objects can be accessed via WScript.Shell, for example.
Note: Starting with version 3.0 of the PPB, the Invoke-Script command can also be generated by dragging and dropping script files (*.ps1, *.vbs, *.js and *.pl) into the script window. If the files are already in the package directory, the source path is referenced relatively with .\, if the source files are outside the package directory, the full path is taken. |
Settings:
- Script file
Input of a script file with path, variables are allowed. Use the "..." button to select an existing file (on the packaging system) or enter the path manually. Please enter the external script that should be processed by a script engine. The script engine recognizes the language of the external script by the file extension: - VB-Script (Visual Basic Script). Extension: .VBS
- JScript (extended JavaScript). Extension: .JS
- Perl Script. Extension: .PL
- PowerShell Script. Extension: .PS1
- Use 32-Bit mode on x64 computer
If the script is executed on a 64-bit operating system, the counterpart for 32-bit applications SysWOW64 can be used automatically when referring to the SYSTEM32 directory. - Execute with .NET Framework
This option appears only when the command is used to run a PowerShell script and specifies the .NET Framework Runtime version under which the script runs. - Latest
Uses the latest installed .NET Framework version. At the time of writing this documentation this is version 4.8. - v2.0
Uses .NET Framework Version 2.0 - v3.0
Uses .NET Framework Version 3.0 - v3.5
Uses .NET Framework Version 3.5 - v4.0
Uses .NET Framework Version 4.0
Example:
The example below calls a PowerShell script from the Files subdirectory of the package directory and uses the latest .NET Framework version to run it.
Corresponds to DSM eScript commands:
- CallScript
- CallScriptEx
See also: