"Please run Ranorex with Admin privileges." : Automation API

"Please run Ranorex with Admin privileges."

Class library usage, coding and language questions.

"Please run Ranorex with Admin privileges."

Postby timm » Fri Apr 04, 2008 10:20 pm

I was debugging a Ranorex test application using an account with normal user (i.e. non-admin) privilege on an XP Service Pack 2 virtual machine, when the app suddenly stopped and displayed a messagebox stating "The current user has insufficient access privileges. Please run Ranorex with Admin priveleges." This is a question that I probably already know the answer to, but I'll ask it anyway. Is there any way to get around the requirement that Ranorex apps need to run on an account with Admin priviledge? This would seem to be important as most testing organizations would want to ensure that their apps run properly under non-priveledged user accounts (especially with Vista).

Thanks,
Tim
timm
 
Posts: 6
Joined: Thu Mar 13, 2008 12:10 am
Location: Seattle, WA USA

Postby Support Team » Mon Apr 07, 2008 3:08 pm

Tim,

Using Ranorex with non-admin accounts does work, but unfortunately not in the trial version.

Michael
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Postby timm » Fri Apr 11, 2008 10:57 pm

We have a registered version now, and while I didn't encounter this issue yet debugging today, I did encounter it when I tried to run the recorder on a non-priveleged account. So it would seem like it isn't an issue with the trial version.

Tim
timm
 
Posts: 6
Joined: Thu Mar 13, 2008 12:10 am
Location: Seattle, WA USA

Postby Support Team » Mon Apr 14, 2008 1:53 pm

You are right, that's a bug in the RanorexRecorder licensing.

We fixed this bug in the Ranorex version that is currently available at:
http://www.ranorex.com/download.html

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

It doesn't work

Postby Dab » Wed Jul 30, 2008 12:42 pm

I tried it, but it doesn't work.
The newly compiled exe ( with the dlls of version 1.5) shows the same message..
Dab
 
Posts: 5
Joined: Mon Jul 28, 2008 1:48 pm

Postby Support Team » Thu Jul 31, 2008 5:06 pm

After installing Ranorex 1.5, did you register the new version using the RanorexRegister.exe? If not, please do so!

Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Register?

Postby Dab » Fri Aug 01, 2008 10:01 am

Yes, I did it, but it still doesn't work.
Dab
 
Posts: 5
Joined: Mon Jul 28, 2008 1:48 pm

Postby Support Team » Mon Aug 04, 2008 8:05 pm

Can you please give us more detailed information.
How can we reproduce this problem? What are the steps we need?
Does everything work OK if you do the same with an admin account?

Jenö
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Postby Dab » Tue Aug 05, 2008 12:37 pm

Hi, yes it works with admin rights.
Following a little code snipplet, which only works with admin rights:
Code: Select all
               control = parent.FindControlName("extendedGrid");
                control.Focus();
                Logger.Info("User", "Get the accessibility element of the control.");
                controlElement = control.Element;
                Logger.Info("User", "Find child element in control by name={0}", args[0]);
                element = controlElement.FindChildValue(args[0], SearchMatchMode.MatchExact);
Dab
 
Posts: 5
Joined: Mon Jul 28, 2008 1:48 pm

Postby Support Team » Wed Aug 06, 2008 5:26 pm

Dab,

What kind of application are you automating (MFC, .NET, WPF) ?
Is the application running under the same user account as your test script ?
In the code sample you posted, where and what exactly is the difference between admin and non-admin?

Michael
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Postby Dab » Thu Aug 07, 2008 5:21 pm

Hi Michael
I'm automating a .Net app.
The app is running under the same user account.
I don't know the difference. If the user has admin rights, everything is ok. If not, ranorex throws the dialog and stops working. I think the find.. functions are responsible for this behaviour.
Dab
 
Posts: 5
Joined: Mon Jul 28, 2008 1:48 pm

Postby Support Team » Fri Aug 08, 2008 11:27 am

Hi,

I tried the same code you posted as a non admin user, but it worked for me with the sample VS2005Application.exe:

Code: Select all
Form form = Application.FindFormTitle("RanorexTestedApp");
form.Activate();
Control control = form.FindControlName("checkedListBox1");
control.Focus();
Mouse.ClickControl(control);
controlElement = control.Element;
Element element = controlElement.FindChildValue("False", SearchMatchMode.MatchExact);
Mouse.ClickElement(element);


Please try this code with VS2005Application.exe and inform us about the results.

Jenö
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests