PDA

View Full Version : Reg. Problem


kadel
03-20-2008, 09:50 PM
Hi All , I need help to create a reg check to start my application

the code in On Startup this example


result = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\My Application\\Name", "ok", true);
if not ok then
Application.Exit();
end


in reg
http://img246.imageshack.us/img246/9752/dibujosv4.th.jpg (http://img246.imageshack.us/my.php?image=dibujosv4.jpg)

I nee to check my application this value (Start = OK) for to start


sorry for my english, I talk spanish

And thank to response

longedge
03-21-2008, 05:54 AM
In your screenshot you show HKEY_CURRENT_USER but in your code you are checking HKEY_LOCAL_MACHINE.

Based on the screenshot, try -

result = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\My Application\\Name", "Start", false);

if result ~= "ok" then
Application.Exit()
end

kadel
03-21-2008, 06:20 AM
you have rightly, I make wrong regestry :rolleyes

heheheh :lol thanks