How to run an exe from powershell instead of cmd

Experiences, small talk, and other automation gossip.
motoxxiii
Posts: 1
Joined: Mon Sep 21, 2015 9:43 pm

How to run an exe from powershell instead of cmd

Post by motoxxiii » Wed Oct 07, 2015 4:58 pm

I know I can run a test plan from command prompt, but I actively powershell. It's nothing major, but I dislike having to open cmd.exe to run a test plan, when I already have powershell open.

I followed the steps for using cmd with powershell and I get the following error.
The term 'Quick_Test.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:14
any advise?

Thanks,
Aaron

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to run an exe from powershell instead of cmd

Post by odklizec » Thu Oct 08, 2015 8:30 am

Hi and welcome here,

If you want to run exe from powershell, you need to call it like this:
PS c:\users\username . "c:\path\to\your\test.exe"
Notice the "." in front of the path to exe. This must be there! And if the path to exe contains spaces, you need to enclose the entire path in double quotes. Hope this helps?

For more details (and more ways) about running exes from powershell check this page:
http://social.technet.microsoft.com/wik ... ables.aspx
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration