|
-
January 8th, 2011, 09:46 AM
#1
How to read a Registry value??
I got this code.
I want to read a string from a registry key, if its 0 do one thing, and if its 1, do something else.
This code (if it works..) would at the first time create a sub key, and assign it to 1, but if its not existing, it would then show a few messageboxe's - But it doesnt work, even if I set it to 1 or 0, it won't work, it always displays the messages.
If My.Computer.Registry.GetValue("HKEY_CURRENT_USER\A Sim Game Studios\A Sim Game - Business",
"FirstRun", "1") Then
MessageBox.Show("Your name is Jay J, you are 23 years old")
MessageBox.Show("You are a grad student that can't find a job in a tough world")
MessageBox.Show("You decide to make something of yourself - beginning with the 50$ in your pockets you set out to become one of the biggest business owners in your city")
End If
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\A Sim Game Studios\A Sim Game - Business",
"FirstRun", "1")
Anyone can help?
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
|