Link to home
Start Free TrialLog in
Avatar of Suporte CCE
Suporte CCEFlag for Brazil

asked on

Issue with application access to registry

Hi.

We have a legacy application, made with delphi, and we´re having a strange issue on Windows 10.

When we input login credentials in the application, it uses "Registry.OpenKeyReadOnly" and verify for a key in HKEY_LOCAL_MACHINE\SOFTWARE\<appname>.
Then it uses Registry.ValueExists, if the key doesn´t exist, it gives an error "please install application". If exists, it proceeds with login.

We never had an issue with Windows 7, both x86 and x64.

Recently we upgraded our stations to Windows 10. And the application was working for weeks. Now, some stations (some x86 and others x64) are returning the "please install application" error, even if the key exists. That happened in 4 stations yesterday, and today another 3 started having the same problem.

And that just happens with the current local user. If we run as administrator, it works. If another non admin user logs on that machine, it works too. If the same user logs in another machine, it also works (even if the current user in that machine is having the login issue).

I thought it might be a permission problem, but with Powershell, if I run "Get-ItemProperty Registry::HKEY_LOCAL_MACHINE\SOFTWARE\<appname>" I get all the keys informations. I can also see the keys with regedit.

Then I thought about some recent windows update, but my user (non admin) can login with the application in another station with all updates installed, and doesn´t work in mine.

Any ideas? Really lost here.
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree with the above.  However, Windows 10 (its underpinnings, security and other stuff) changes entirely roughly every six months.

So best to rewrite the application to Windows 10 standards, otherwise you may have to adapt what you have to Windows 10 every year or so.
Avatar of Suporte CCE

ASKER

Procmon did the trick.

I found out that, even the code in the application pointing to HKLM\SOFTWARE\<appname> (and writing there), when I open the .EXE, it was looking for the key in HKEY_USERS\<USERSID>_Classes\SOFTWARE\<appname>. I created the key there and it´s working now.

Why it´s doing that only with the current local user and not all non-admin users, I have no idea, but at least I have a solution  now.

Thanks a lot!