By default SD Agent executes the jobs of type "Command file" with a cmd (Command interpreter) in 32 bit mode.
Sometimes it is necessary to execute the command file in 64 bit mode.
How to execute a "command file" SD job in 64 bit mode:
In the Configuration policy it is possible to specify the bit mode (32 or 64 bit) for Command interpreter :
DSM/Software Delivery/Agent/File Association: Command interpreter bit mode :
This parameter is "locally Managed" but it is possible to make it "Centrally Managed" and change the settings in a Configuration Policy applied on a group of machines.
In Locally Managed mode, it is possible to update the value directly on the agent machine with this command :
ccnfcmda -cmd SetParameterValue -ps itrm/usd/agent -pn cmdBinaryMode -v "64 bit"
The value could be checked with this command :
ccnfcmda -cmd GetParameterValue -ps itrm/usd/agent -pn cmdBinaryMode
The disadvantage of Solution 1 is that all "command file" SD jobs will be executed in 64 bit mode.
If we need to execute the command interpreter in 64 bit for only one or few SD jobs we could let the cmdBinaryMode to default value (32 bit) and create a .cmd file containing following code :
IF DEFINED ProgramFiles(x86) (
IF NOT %PROCESSOR_ARCHITECTURE% == x86 SET PROCESS_64=1
IF DEFINED PROCESSOR_ARCHITEW6432 SET PROCESS_64=0
IF %CPU_64% EQU 1 (
IF %PROCESS_64% EQU 0 SET CMD_PATH=%SystemRoot%\sysnative
%CMD_PATH%\cmd /C script_to_launch_in_64_bit.cmd
Replace script_to_launch_in_64_bit.cmd by the command to execute in 64 bit.
Add this script in the SD Package and use it for the SD Procedure.
PROCESS_64 is a flag to indicate if the process is running in 32 or 64 bit mode.
CPU_64 is a flag to indicate if the OS is 64 bit or 32 bit.
If the OS is 64 bit and process is 32 bit, cmd.exe is executed from path %SystemRoot%\sysnative (which is redirected to 64 bit system32 directory).