Announcement

Collapse
No announcement yet.

A problem using the 'Registry.GetValue' action

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kachok
    replied
    Ok, I will try your plugin and reply soon.
    Regards

    Leave a comment:


  • Ulrich
    replied
    Your screenshot shows the 64-bit registry. As I mentioned in my previous reply, without additional help, your code will be reading from the 32-bit registry at Wow6432Node - the read operation is redirected by the operation system.

    I developed this plugin a long time ago to overcome this limitation.

    Ulrich

    Leave a comment:


  • kachok
    replied
    Yes, I use Windows 7 x64.

    I tried this: Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\ImageMagick\\Current", "Version", true)
    but still the same, it returns a blank string.

    I am positive that the registry key carries a value and it is not empty (see the screenshot).

    Leave a comment:


  • Ulrich
    replied
    It looks like the registry key does not carry a value and is empty. Remember that, if this code is being run on a x64 operating system, the key being inspected is actually HKEY_LOCAL_MACHINE\Software\Wow6432Node\ImageMagick\Current

    ​​​​​​​Ulrich

    Leave a comment:


  • kachok
    started a topic A problem using the 'Registry.GetValue' action

    A problem using the 'Registry.GetValue' action

    Hi there, I try to get a specific Registry value's data using this script:


    sImVer = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\ImageMagick\\Current", "Version", true);

    Dialog.Message("ImageMagickVersion", sImVer, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

    -- Check to see if an error occurred.
    error = Application.GetLastError();
    -- If an error occurred, display the error message.
    if (error ~= 0) then
    Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
    end


    But a blank string is returned, and I do not receive any message about errors, using Application.GetLastError().

    What could be wrong?
Working...
X