Announcement

Collapse
No announcement yet.

Issues with Registry.DoesKeyExist

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

  • Issues with Registry.DoesKeyExist

    In continuing to evaluate Setup Factory as a possible solution for us, I'm trying to recreate one of our existing install packages. I'm having issues with a Dependency module that I'm trying to create for Node.js. The detection script is what I'm having a problem with. Here is my detection script in its current form:

    function IsNodeInstalled()
    Debug.ShowWindow(true);
    Debug.SetTraceMode(true);


    local Node_Key = "SOFTWARE\\Node.js";
    --Check to see if the registry key exists
    local Node_Registry = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, Node_Key);

    if (Node_Registry == false) then

    --if (not Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\\Node.js")) then

    SetupData.WriteToLogFile("Node was not found. Kicking off Node Installation.");
    --Dialog.Message("Node", "Node Detection False");

    return false;
    end
    --Dialog.Message("Node", "Node Detection True");

    SetupData.WriteToLogFile("Node was found. Skipping Node Installation and continuing on.");

    return true;

    end



    The issue is that the registry key exists...you can see it in the attachment. But the call to DoesKeyExist() never finds it and so the install of Node always kicks off.

    I hope I'm just doing something dumb, but I can't get this to work correctly.

    Thanks,
    Doug
    Attached Files

  • #2
    I assume you are using a 64-bit operating system and a 32-bit installer? Mentioning this would be useful when requesting help...

    Ulrich

    Comment


    • #3
      I am, and that might qualify as the "dumb thing" I'm doing. Switching to a 64-bit installer fixes the problem. Is there a way for a 32 bit installer to check if the 64 bit registry key exists? I'm a bit new to installers in general, so more information or pointing me in the right direction would be helpful since you've clearly seen this before.

      Comment


      • #4
        Please check this.

        Ulrich

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎