Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5

Thread: RegKeyExist

  1. #1
    Join Date
    Jul 2008
    Location
    Switzerland
    Posts
    224

    RegKeyExist

    it would be nice we can check an value data in the registry.

    I have to check is there an value in the ODBC Data Sources.
    If im use Registry.DoesKeyExist, the Registry exist on every System. But not everyone have the value, or data inside.

    Code:
    (HKEY_LOCAL_MACHINE,"SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources","softadm","DataDirect 4.20 32-BIT OpenEdge SQL v10.0B");
    Code:
    (HKEY_LOCAL_MACHINE,"SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources","softadm","Progress OpenEdge 10.2A Driver",REG_SZ);
    Regards,
    Rolf

  2. #2
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,834
    Maybe I'm misunderstanding, but wouldn't checking the returned result of Registry.GetValue accomplish what you're trying to do?
    Darryl
    Indigo Rose Corporation

    Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

  3. #3
    Join Date
    Jul 2008
    Location
    Switzerland
    Posts
    224
    Hi Darryl

    if i try to check the value in HKLM i receive nothing. But in the Path i have C:\Program Files\7-Zip
    Code:
    -- Read the value.
    registry_value = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\7-Zip", "Path", true);
    
    -- Display the value read from the Registry in a dialog.
    Dialog.Message("Registry Data", "The value read from the Registry is "..registry_value..".");
    if i try the same under HKCU the Dialog Message are correct.
    Code:
    -- Read the value.
    registry_value = Registry.GetValue(HKEY_CURRENT_USER, "Software\\7-Zip", "Path", true);
    
    -- Display the value read from the Registry in a dialog.
    Dialog.Message("Registry Data", "The value read from the Registry is "..registry_value..".");
    actually i check this with Registry.DoesKeyExist, but would be nice i can check an value in HKLM

    System is an Win7 x64 with the lastest SUF

  4. #4
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Setup Factory is a 32-bit application, and is being redirected when you try to access 64-bit registry hives.
    http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx

    Ulrich

  5. #5
    Join Date
    Jul 2008
    Location
    Switzerland
    Posts
    224
    thanks Ulrich

    now i understand

    Rolf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts