Page 1 of 1

Having issue while executing batch file with Ranorex

Posted: Tue May 24, 2016 3:43 pm
by ziasim
Hi,

I have created a batch file which have command to execute power shell script on remote machine using PSExec. If I execute this batch file as standalone it works fine, started powershell script on remote machine and do its job.

My interest is to run this file using Ranorex. But when I try to start it via Ranorex as Run Application action item, it opened command prompt but gives an error that PSExec is not recognized as an internal or external command.

Here is the command I am using to run powershell script on remote machine using PSExec

psexec -i -d \\<machineName> -u <userNaem> -p <Password> powershell -noexit "C:\Users\Administrator\Desktop\AutomatedTestData\Scripts\RevertWin7Snapshot.ps1"


Any help would be highly appreciated..........?

Thanks

Re: Having issue while executing batch file with Ranorex

Posted: Wed May 25, 2016 11:04 am
by odklizec
Hi,

Have you tried to set the working directory to psexec (in Run application command)? Also, make sure you run your test with admin rights.

Re: Having issue while executing batch file with Ranorex

Posted: Wed May 25, 2016 3:50 pm
by ziasim
Hi,

Tried to run batch script by setting working directory to PSExec lcoation but no luck. I am already running test with admin rights.

Any other guess..?

Re: Having issue while executing batch file with Ranorex

Posted: Fri May 27, 2016 1:36 pm
by RobinHood42
Hi,

Did you already google the error message?
I found a lot of postings in e.g. stackoverflow forum discussing this topic the same error.
I hope you find a solutin there.

Cheers,
Robin