Page 1 of 1

Opening ranorex as a different user

Posted: Mon Nov 27, 2017 4:02 pm
by Andrew Simpson
Hi,

We have an internal testing environment and our AUT has different configurations based on who you log in as, as part of the test we need to start the application but as a different user so we are prompted for the right screen.

I wanted to do this using the application.run method but don't seem to be having much luck. I don't actually need to login using code so guess its not full blown impersonation just need to be prompted to enter windows credentials

Any help would be appreciated

Code: Select all

Report.Log(ReportLevel.Info, "Application", "Run application 'yourapp' with arguments '' in normal mode.");
            Host.Local.RunApplication("yourapp", "", "", false);

Re: Opening ranorex as a different user

Posted: Tue Nov 28, 2017 10:15 pm
by Support Team
Hello Andrew,

Have you tried using the Runas command line tool to launch your application as a different user?

Code: Select all

runas [{/profile | /noprofile}] [/env] [{/netonly | /savecred}] [/smartcard] [/showtrustlevels] [/trustlevel] /user:<UserAccountName> "<ProgramName> <PathToProgramFile>"
RunAs.png
I hope this helps!

Cheers,
Ned