Click here to Skip to main content
15,890,932 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,
In our c# application, we have created registry by using "Registry.LocalMachine", And it created registry at (for 32 bit Pc) "HKEY_LOCAL_MACHINE\SOFTWARE\VMS" location. It works fine with XP/Win7. But for Win10, it creates the registry at different location
"HKEY_USERS\S-1-5-21-1562210660-278341176-3609463930-1001\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Microsoft\VMS"

Please let me know, if any solution for this so our application create registry at"HKEY_LOCAL_MACHINE\SOFTWARE\VMS" even if with win10
Also we have seen many applications(like mozila) creates registry under HKEY_LOCAL_MACHINE\SOFTWARE\ even if win10.

What I have tried:

For this we have tried these 2 solutions
1 we have set track bar to never notify of "User account and control setting" from control panel
2. Disable UAC with Registry Editor (RegEdit)
Run Registry Editor (RegEdit) and navigate to the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
Locate the following REG_DWORD value:
EnableLUA
Set the value of EnableLUA to 0.
Posted
Updated 4-Sep-17 4:27am
v3

The simplest solution is this: don't use the Registry.
That's a much better idea than you think: use of the Registry is more restricted than it was, and becoming more restricted with time, not easier. So what works now, may not work in future, as you have noticed with Win 7 / Win 10. And that is for good reason: too many apps were misusing it and causing damage, or extreme bloat.
Instead of using the registry, use a configuration file, or store it in a "safe" folder: Where should I store my data?[^] suggests some and shows the code to access them.
 
Share this answer
 
Hi,
your problem is not related to Windows XP/7 vs. 8/10 but to 32-bit vs. 64-bit versions of windows. If you run a 32-bit application on a 64-bit windows, it is executed using WoW64 (Windows on Windows 64). WoW64 redirects your registry-access to a different part of the registry (same for file access to certain system folders).
One approach would be to provide a 64-bit version of your application for the according operating systems.

Regards,
Tim
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900