"Please run Ranorex with Admin privileges."

Class library usage, coding and language questions.
timm
Posts: 6
Joined: Wed Mar 12, 2008 11:10 pm
Location: Seattle, WA USA

"Please run Ranorex with Admin privileges."

Post by timm » Fri Apr 04, 2008 9: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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Apr 07, 2008 2:08 pm

Tim,

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

Michael
Ranorex Support Team

timm
Posts: 6
Joined: Wed Mar 12, 2008 11:10 pm
Location: Seattle, WA USA

Post by timm » Fri Apr 11, 2008 9: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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Apr 14, 2008 12: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

Dab
Posts: 5
Joined: Mon Jul 28, 2008 12:48 pm

It doesn't work

Post by Dab » Wed Jul 30, 2008 11:42 am

I tried it, but it doesn't work.
The newly compiled exe ( with the dlls of version 1.5) shows the same message..

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Thu Jul 31, 2008 4: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

Dab
Posts: 5
Joined: Mon Jul 28, 2008 12:48 pm

Register?

Post by Dab » Fri Aug 01, 2008 9:01 am

Yes, I did it, but it still doesn't work.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Aug 04, 2008 7: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

Dab
Posts: 5
Joined: Mon Jul 28, 2008 12:48 pm

Post by Dab » Tue Aug 05, 2008 11:37 am

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);

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Wed Aug 06, 2008 4: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

Dab
Posts: 5
Joined: Mon Jul 28, 2008 12:48 pm

Post by Dab » Thu Aug 07, 2008 4: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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Fri Aug 08, 2008 10: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