Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

get registry value

right - I have the directory to my app stored in

HKEY_CURRENT_USER/ Software/myAppName


name= (default)


how do I read it? I've tried searching the RegGetValue but couldn't get it to work/ understand how it works.

Comments

  • carlycarly Posts: 46Member

    : how do I read it? I've tried searching the RegGetValue but couldn't
    : get it to work/ understand how it works.

    Just copy MSDN samples and it works in 2 seconds
    or see adv. win32 api forum,
    news://194.177.96.26/comp.os.ms-windows.programmer.win32
    where it has been given hundreds of times...


  • BitByBit_ThorBitByBit_Thor Posts: 2,444Member
    :
    : : how do I read it? I've tried searching the RegGetValue but couldn't
    : : get it to work/ understand how it works.
    :
    : Just copy MSDN samples and it works in 2 seconds
    : or see adv. win32 api forum,
    : news://194.177.96.26/comp.os.ms-windows.programmer.win32
    : where it has been given hundreds of times...
    :
    :
    :

    To add a little bit of descriptive text to help you oversee how the registry works:
    You need to Open the keys first. Then you can modify the Values of an open key, enumerate them, and also enumerate the sub-keys of your open key.
    Don't forget to close all the open handles (open keys) when you're done with them.
    MSDN is your friend. Look for RegOpenKeyEx and/or RegCreateKeyEx for opening the key (http://msdn.microsoft.com/en-us/library/ms724897(VS.85).aspx)
    RegCloseKey is used to close the key
    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
  • FlamingkatFlamingkat Posts: 5Member
    :
    : : how do I read it? I've tried searching the RegGetValue but couldn't
    : : get it to work/ understand how it works.
    :
    : Just copy MSDN samples and it works in 2 seconds
    : or see adv. win32 api forum,
    : news://194.177.96.26/comp.os.ms-windows.programmer.win32
    : where it has been given hundreds of times...
    :
    :
    :
    HKEY key;
    RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\Microsoft\Windows\CurrentVersion\Run",0,KEY_QUERY_VALUE,&hKey );

    After reading the key, put it into a variable to hold.

  • meghapmeghap Posts: 2Member
    Hi,
    How can I call below function for remote machine?

    HKEY key;
    RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\Microsoft\Windows\CurrentVersion\Run",0,KEY_QUERY_VALUE,&hKey );

    Thanks,
    Megha
    : :
    : : : how do I read it? I've tried searching the RegGetValue but couldn't
    : : : get it to work/ understand how it works.
    : :
    : : Just copy MSDN samples and it works in 2 seconds
    : : or see adv. win32 api forum,
    : : news://194.177.96.26/comp.os.ms-windows.programmer.win32
    : : where it has been given hundreds of times...
    : :
    : :
    : :
    : HKEY key;
    : RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\Microsoft\Windows\Curren
    : tVersion\Run",0,KEY_QUERY_VALUE,&hKey );
    :
    : After reading the key, put it into a variable to hold.
    :
    :

Sign In or Register to comment.