Opening ranorex as a different user

Class library usage, coding and language questions.
Andrew Simpson
Posts: 22
Joined: Thu Dec 03, 2015 11:58 am

Opening ranorex as a different user

Post by Andrew Simpson » Mon Nov 27, 2017 4:02 pm

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);
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Opening ranorex as a different user

Post by Support Team » Tue Nov 28, 2017 10:15 pm

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
You do not have the required permissions to view the files attached to this post.