NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Run cmd.exe in 32-bit version of TS as if it was run in 64-bit version

Solved!
Go to solution

I try to call this Bluetooth on/off PowerShell script using the CallExecutable step in TestStand 2020 32-bit. Apparently, it fails in step $bluetooth = $radios | ? { $_.Kind -eq 'Bluetooth' }. However, if I switch to TestStand 2020 64-bit it works like a charm. How can I force the 32-bit version of TestStand to run the CallExecutable step in 64-bit mode? Or maybe how to force cmd.exe/PowerShell.exe in this step to run in 64-bit mode?

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 1 of 3
(1,527 Views)
Solution
Accepted by topic author bienieck

My solution is to use bat file. This bat is called using CallExecutable step in TestStand 2020 32-bit. In this bat I call ps1 file BUT using 64 bit PowerShell. Like this: %SystemRoot%\sysnative\WindowsPowerShell\v1.0\PowerShell.exe -NoProfile -ExecutionPolicy Bypass -File %ScriptPath%

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 2 of 3
(1,492 Views)

There is even easier solution, without bat file:

 

BTONOFF.png

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 3 of 3
(1,442 Views)