Announcement

Collapse
No announcement yet.

Registry query / DoesKeyExist

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

  • Registry query / DoesKeyExist

    Why does the following query not work?


    result = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "System\\ControlSet001\\Control\\Nis\\Language\\In stallLanguage\\0407");

    if result == true then
    Dialog.TimedMessage("Please Wait...", "German Text", 20000, MB_ICONINFORMATION);


    elseif result == false then
    Dialog.TimedMessage("Please Wait...", "Englisch Text", 20000, MB_ICONINFORMATION);


    end

  • #2
    InstallLanguage is a value, not a key.

    Ulrich

    Comment


    • #3
      Thanks for your answer!
      Is there the possibility to query this value? And if so, how?

      Comment


      • #4
        Hello, this should work:

        Code:
        local sInstallLanguage = Registry.GetValue(HKEY_LOCAL_MACHINE, "System\\ControlSet001\\Control\\Nls\\Language", "InstallLanguage");
        
        if (sInstallLanguage == "0407") then
            Dialog.TimedMessage("Please Wait...", "German Text\r\n" .. sInstallLanguage, 5000, MB_ICONINFORMATION);
        else
            Dialog.TimedMessage("Please Wait...", "Englisch Text\r\n" .. sInstallLanguage, 5000, MB_ICONINFORMATION);
        end
        Ulrich

        Comment


        • #5
          Thank you for your permanent Support here in the Forum!
          Sometimes you did not win the forest!

          Thank you very much
          kampen






          Comment

          Working...
          X