-
Jul 9th, 2013, 03:14 PM
#1
Thread Starter
Addicted Member
Reading Registry Framwork 1.1/Windows 7
Hey,
I have a program developed on 1.1 that works perfectly on Windows XP but is having trouble running on Windows 7 simply because of the registry.
It is to big a program to upgrade to a newer framework so I am just trying to fix the registry reads in Windows 7.
The one big problem is here
vb.net Code:
Dim regkey as Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\Elel\View",False)
But for some reason everytime regkey is always nothing.
I turned UAC off so it is not that
And I have Framework 1.1 installed.
I am not sure what exactly is going wrong unfortunately.
Any advice?
-
Jul 9th, 2013, 03:15 PM
#2
Junior Member
Re: Reading Registry Framwork 1.1/Windows 7
could you not change it to currentuser instead of localmachine?
-
Jul 9th, 2013, 03:17 PM
#3
Junior Member
Re: Reading Registry Framwork 1.1/Windows 7
Sorry i rushed that answer out... Do you have more information like for example what the error is?
-
Jul 9th, 2013, 03:23 PM
#4
Re: Reading Registry Framwork 1.1/Windows 7
But for some reason everytime regkey is always nothing.
So have you fired up RegEdit to see whether the key's even there? It's absence would be the most obvious explanation!
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Jul 9th, 2013, 03:25 PM
#5
Junior Member
Re: Reading Registry Framwork 1.1/Windows 7
Originally Posted by dunfiddlin
So have you fired up RegEdit to see whether the key's even there? It's absence would be the most obvious explanation!
Lol why didn't i think of that,
Also
I turned UAC off so it is not that
I have had weird permission issues with registry and windows 7/8 and i also had UAC off so not sure if UAC makes much difference
-
Jul 9th, 2013, 03:34 PM
#6
Thread Starter
Addicted Member
Re: Reading Registry Framwork 1.1/Windows 7
Originally Posted by Fma965
Sorry i rushed that answer out... Do you have more information like for example what the error is?
No worries! I tried current user as well but get the same thing. There is no error just the value of Nothing
Originally Posted by dunfiddlin
So have you fired up RegEdit to see whether the key's even there? It's absence would be the most obvious explanation!
Yes xD I have checked if it exists and it does.
EDIT: You are partially right :P
http://stackoverflow.com/questions/3...returning-null
It looks like because I am compiling in 32bit, it is looking into
Code:
HKLM\SOFTWARE\Wow6432Node\...
instead of
as per the link.
Now because I am using 2003 and do not think I can compile this in 64bit, does anyone know how to modify the above line of code so it looks in the 32bit directory?
Last edited by Crzyrio; Jul 9th, 2013 at 03:39 PM.
-
Jul 9th, 2013, 03:41 PM
#7
Junior Member
Re: Reading Registry Framwork 1.1/Windows 7
Originally Posted by Crzyrio
No worries! I tried current user as well but get the same thing. There is no error just the value of Nothing
Yes xD I have checked if it exists and it does.
Well in .NET 2.0 i just use my.computer.registry.getvalue but i don't think this exists in 1.1 and you don't want to update So i have 2 suggestions
1. 32-bit and 64-bit applications have different views of the registry. In regedit the key you are getting in code is at HKLM\Wow6432Node\Software\Elel\View not HKLM\Software\Elel\View
2. Run as admin
Also are you trying to get a Key or Value?
-
Jul 9th, 2013, 04:10 PM
#8
Re: Reading Registry Framwork 1.1/Windows 7
So, to be clear, you're compiling for Framework 1.1 (2003, all support ended 2008) using VS 2003 (now in its 5th revision since then) on a 64 bit machine (first supported by MS c. 2005) for Windows 7 (2009) which has a minimum framework of 3.5? What could possibly go wrong?
Presumably with 2003 there's not even an AnyCPU option so I really don't know how to get you out of the hole.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Jul 9th, 2013, 04:17 PM
#9
Junior Member
Re: Reading Registry Framwork 1.1/Windows 7
Originally Posted by dunfiddlin
So, to be clear, you're compiling for Framework 1.1 (2003, all support ended 2008) using VS 2003 (now in its 5th revision since then) on a 64 bit machine (first supported by MS c. 2005) for Windows 7 (2009) which has a minimum framework of 3.5? What could possibly go wrong?
Presumably with 2003 there's not even an AnyCPU option so I really don't know how to get you out of the hole.
LOL, Epic summary
-
Jul 10th, 2013, 07:39 AM
#10
Thread Starter
Addicted Member
Re: Reading Registry Framwork 1.1/Windows 7
Originally Posted by dunfiddlin
So, to be clear, you're compiling for Framework 1.1 (2003, all support ended 2008) using VS 2003 (now in its 5th revision since then) on a 64 bit machine (first supported by MS c. 2005) for Windows 7 (2009) which has a minimum framework of 3.5? What could possibly go wrong?
Presumably with 2003 there's not even an AnyCPU option so I really don't know how to get you out of the hole.
Thanks....
There is always a way, just a matter of finding it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|