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
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
Comment