How to run 64-bit scripts when using Software Delivery with User interaction enabled.

Document ID : KB000094289
Last Modified Date : 23/08/2018
Show Technical Document Details
Introduction:
When the Software Delivery Item Procedure or Job Option for Enabling User Interaction is selected it will only run scripts in a 32-bit mode which may cause the script to have an unexpected outcome depending on what it attempts to access or accomplish.

User-added image

This document describes how you can use DMS scripting, to launch a script interpreter in 64-bit mode, to achieve the desired results.
Environment:
Client Automation (ITCM) -- any version.
Instructions:
In this example we see how to call the PS1 file (powershell script) from a DMS script that sets 64-bit mode...
 
------------------------------
setmode64(TRUE)
dim sCmd as String
dim retcode as integer
sCmd = "powershell.exe -ExecutionPolicy ByPass -NoLogo -NonInteractive -WindowStyle Hidden -File your_script_name.ps1"
retcode=Execute(sCmd,True,0)
SetStatus(retcode)
Exit
------------------------------