How to run 64-bit scripts when using Software Delivery with User interaction enabled?
search cancel

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

book

Article ID: 94289

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation CA Client Automation - Software Delivery

Issue/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.


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 - All versions.

Resolution

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
------------------------------