View Full Version : vista registry help
GoOgLe
10-18-2009, 05:27 AM
works on xp but not vista !!!
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\My App\\Users", "Username", ""..EncryptedUsername.."", REG_SZ);
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\My App\\Users", "Password", ""..EncryptedPassword.."", REG_SZ);
user = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\My App\\Users", "Username", true);
pass = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\My App\\Users", "Password", true);
how can i make it work in all os ?
mystica
10-18-2009, 12:35 PM
Why not just use
result = System.GetOSName(); to determine the OS, then use an if/then statement to apply the appropriate regkey pathway?
Of course, you'd need to know the correct regkey paths for each OS beforehand, but I'm sure some members here can give you the equivalent pathways for Vista, Windows-7, etc ...
I use XP myself, so can't help out in that regard ... but I know there are one or two members here who run multiple virtual OS's, who could give that info.
Sakuya
10-18-2009, 12:45 PM
Well to access the registry on Vista you'll probably need to run the program as an Administrator..
mystica
10-19-2009, 12:13 PM
Well to access the registry on Vista you'll probably need to run the program as an Administrator..
Really??? I don't use Vista so am on unfamiliar ground, but I find that surprising! I know Vista prevents file-write access to the system-drive without Administrator rights, but surely AMS can still access its registry, regardless???
Can someone who uses Vista confirm Sakuya's assumption, please? I'd very much like to know this, myself.
Sakuya
10-19-2009, 12:24 PM
Well, That's why IndigoRose added System.GetUserInfo().IsVistaLimitedToken.
mystica
10-19-2009, 12:52 PM
Well, That's why IndigoRose added System.GetUserInfo().IsVistaLimitedToken.
I hear you, Sakuya ... but wasn't that for the purpose of determining file-write access issues, rather than registry issues??? :huh
rexzooly
10-19-2009, 12:56 PM
I hear you, Sakuya ... but wasn't that for the purpose of determining file-write access issues, rather than registry issues??? :huh
Registry is classed also a system protected element in windows vista and windows 7 i have had access problem before with reg not using admin level
so i always request admin levels now unless the program as no need to talk to the pc part from the main run.
mystica
10-19-2009, 12:58 PM
Ah, okay ... thanks for confirming that rexzooly. :o
PS.
In the meantime, can someone please bomb, blow-up, or otherwise destroy all copies of both Vista and Windows-7! ;)
rexzooly
10-19-2009, 01:01 PM
Ah, okay ... thanks for confirming that rexzooly. :o
Not a problem, windows vista is a bank with a option to ender with right id, problem with this is if your low level and you still work at the bank it makes
life harder lol.
Windows 7 is littler better but still very up in your face.
P.S
I like 7 over all windows 0S's from ME up :D
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.