Page 1 of 1

Ranorex Technology Limitation for Win32 on Windows 10

Posted: Fri Nov 20, 2015 5:49 pm
by Aracknid
Hi,

Using Ranorex 5.4.2 on Windows 10. Everything is working fine when I run my scripts in IE (not Edge) but at one point in my script I need to install one of my product's add-on which kicks off an InstallShield setup. This was working fine in Windows 7, but in Windows 10 I get failures because it cannot detect some of the elements in the setup window. When I spy on it, I get the message "Ranorex Technology Limitation, Win32.... The automating process does not have the required security permissions to access the process ..... "

I can't figure out what to do to make this work. I read the info that goes with this, and I'm not really sure what to do. It's not 32/64 bit bridge stuff as far as I know. So it must be security permission (as the message implies) but I'm not sure what to do to resolve it.

Aracknid.

Re: Ranorex Technology Limitation for Win32 on Windows 10

Posted: Mon Nov 23, 2015 11:00 am
by Support Team
Hello Aracknid,

This sounds more like a permission problem.

Maybe the Ranorex and Internet Explorer are not started with the same security rights, i.e. not as the same Windows user. Ensure that both processes are started with the same rights.

Did you already try running Ranorex Spy as Administrator?

Regards,
Bernhard

Re: Ranorex Technology Limitation for Win32 on Windows 10

Posted: Tue Nov 24, 2015 9:09 pm
by Aracknid
OK, so I thought I was running Spy in admin mode, but I guess I wasn't. When I run it in admin mode, it works and can find the elements in the Win32 app.

However when I run my script (an EXE created from Visual Studio), it doesn't work. When I step through the code in Visual Studio, it can find the form of the Win32 object and it can find the combobox on the form that contains text, but it cannot get the text. Spy shows that the text is there and correct. In VS it is nothing.

So I thought, hmmm.... Maybe if I run VS in administrator mode as well it will work. And guess what. It did.

So now I assume if I run the EXE of the script in administrator mode it will also work.

So now I have questions:

1) Why did this start to happen in Windows 10 and it was not necessary in Windows 7 (also I updated Ranorex when I moved up from 7 to 10 as well)?

2) Is there a way to NOT have to do this?

3) My EXE's get build automatically on a CI build server (using CC.NET). How do I programmatically tell the EXE's to run in administer mode?

Thanks,

Aracknid

Re: Ranorex Technology Limitation for Win32 on Windows 10

Posted: Tue Nov 24, 2015 9:25 pm
by krstcs
If you can, try turning off UAC. This will basically make everything run as admin (well, really the system just doesn't interrupt elevation...).

If you can't turn off UAC on the system, you could try "runas". Just pass the admin credentials to the runas command-line as well as the exe to run elevated.

Note: runas may not come pre-installed with Win10, so you may need to get the Windows 10 SDK or something similar, but not sure. Haven't tried it on 10 yet, and I don't have any 10 VMs handy here.

You might also try psexec, just exec on the local system.

Re: Ranorex Technology Limitation for Win32 on Windows 10

Posted: Tue Nov 24, 2015 9:29 pm
by Aracknid
OK, thanks for the thoughts on this.

All my automation Windows 7 clients have UAC turned off, which is probably why it works. For Windows 10, I think I left it on because Edge browser wouldn't run without it.

I use psexec all the time, so I'll try this if UAC cannot be turned off for Edge testing (I'm going to double check this).

Thanks,

Aracknid.

Re: Ranorex Technology Limitation for Win32 on Windows 10

Posted: Tue Nov 24, 2015 9:33 pm
by krstcs
I don't think Edge needs UAC since it isn't a Windows Store App (the old Windows 8/8.1 apps). It should be a Universal App, which should mean it doesn't need UAC... But there's a LOT of should there... :D

Re: Ranorex Technology Limitation for Win32 on Windows 10

Posted: Tue Nov 24, 2015 10:36 pm
by Aracknid
So here's what I've now figured out.

If you turn off UAC through the UI (turn it to "never notify"), it allows you to never be bothered by UAC prompts AND it will allow you to run Edge browser, but you will have the issue I've been having, trying to get stuff to work without running as admin. I believe that this is not "turning off" UAC, but rather it is just turning it down to not bother you but on some low level stuff it is still on.

If you Google turning off UAC, you will see that there is a way to do it in the registry, specifically in the registry go here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System and then for the entry "EnableLUA" set it to "0". I believe this is truly turning it off, more like it is disabling it completely.

This will allow you to run things without being the admin, BUT it will not allow you to run the Edge browser. You'll get a message that says "Microsoft Edge can't open while User Account Control is turned off."

So that's something to be aware of.

Thanks,

Aracknid