Author Topic: How to use CMD commands and/or Run commands ?  (Read 4167 times)

Agent86

  • Jr. Member
  • **
  • Posts: 55
How to use CMD commands and/or Run commands ?
« on: April 22, 2019, 01:34:14 PM »
Hi, I'm wanting to use the DisplaySwitch.exe

The command can be in the run dialague or the CMD "command prompt"

Run dialogue would be a command something like this:
%windir%\System32\DisplaySwitch.exe /external

or I guess I could create some .bat file that has something like
cmd /k echo DisplaySwitch.exe/external or something.

Seems like voicecommand could run one of these with parameters somehow, but I'm noob so I don't know how "YET.

Please advise
Thanks



Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: How to use CMD commands and/or Run commands ?
« Reply #1 on: April 22, 2019, 01:36:33 PM »
Use the "Run an Application" action; Enter the path to the application in the first field, and the command line parameters in the "With these parameters" field.

You should end up with
Code: [Select]
Run application '%windir%\System32\DisplaySwitch.exe' -with parameters '/external'

Agent86

  • Jr. Member
  • **
  • Posts: 55
Re: How to use CMD commands and/or Run commands ?
« Reply #2 on: April 22, 2019, 05:38:08 PM »
Use the "Run an Application" action; Enter the path to the application in the first field, and the command line parameters in the "With these parameters" field.

You should end up with
Code: [Select]
Run application '%windir%\System32\DisplaySwitch.exe' -with parameters '/external'

Thanks for the reply

This fails for some reason. aka running Windows 10

If I just put the path into the first field such as: C:\Windows\System32 or %windir%\System32 then test run takes me to that location but there is no visible DisplaySwitch.exe there. It is only visible when browsing to that location via explorer.

Additionally VoiceAttach browse to location of the .exe also not visible.

Extra parameters do no seem to execute this .exe with the many things I've tried.

Seems like it should just work aka C:\Program Files (x86)\SimXperience\Sim Commander 4\Commander4.exe

Sim commander opens and runs fine, why not DisplaySwitch.exe ?

I don't really know why I can't just use this line to run DisplaySwitch.exe. aka C:\Windows\System32\DisplaySwitch.exe

This does not actually run DisplaySwitch.exe from voiceattack for some reason. No problem clicking on DisplaySwitch.exe within the explorer browsers.

No problem running any of these commands from command prompt. There must be some switch I need for VoiceAttack to run this .exe for some reason I don't understand.



Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: How to use CMD commands and/or Run commands ?
« Reply #3 on: April 22, 2019, 06:16:16 PM »
VoiceAttack is a 32bit executable, so it gets redirected to SysWOW64 instead of system32(for backwards-compatibility reasons) by Windows.

You can use "Sysnative", which is a virtual folder that redirects to the actual system32 folder:
Code: [Select]
Run application '%windir%\Sysnative\DisplaySwitch.exe' -with parameters '/external'

Agent86

  • Jr. Member
  • **
  • Posts: 55
Re: How to use CMD commands and/or Run commands ?
« Reply #4 on: April 22, 2019, 07:41:28 PM »
VoiceAttack is a 32bit executable, so it gets redirected to SysWOW64 instead of system32(for backwards-compatibility reasons) by Windows.

You can use "Sysnative", which is a virtual folder that redirects to the actual system32 folder:
Code: [Select]
Run application '%windir%\Sysnative\DisplaySwitch.exe' -with parameters '/external'

Thanks, works perfectly for voice commands "open triples" , "close triples

I was reading all over the web about this subject and thought it applied somehow but really didn't know how to solve it without using some sort of .bat file or something instead.

Thanks a bunch.