-- This file contains a bunch of common/helpful lua functions & tables, -- attempts are made to keep assumtions to a min, however it is assumed that module_core is loaded, -- and a UI splash screen has been shown function HaltNicelyIfRebootIsNeeded(rebootPromptSequenceName) if RebootCheck() then if GetSettingA("force_silent", "0") == "0" then UISequence({page = rebootPromptSequenceName}) initiateReboot = GetSettingA("start_reboot") == "1" StartReboot(true, initiateReboot) else StartReboot(true, true, "-s") end end end function RunOnceAndPromptForReboot(rebootPromptSequenceName, runOnceArgs) if RebootCheck() then if GetSettingA("force_silent", "0") == "0" then UISequence({page = rebootPromptSequenceName}); initiateReboot = GetSettingA("start_reboot") == "1" StartReboot(true, initiateReboot, runOnceArgs) else runOnceArgs = A(runOnceArgs) .. " -s" StartReboot(true, true, runOnceArgs) end end end function UpdateAndAddFoilARPEntry(arpMsiEdit, arpFoilEdit, uninstall_string, display_icon) arpMsiEdit.objective = "modify" arpMsiEdit.system_component = 1 arpFoilEdit.objective = "add" arpFoilEdit.uninstall_string = uninstall_string arpFoilEdit.display_icon = display_icon ARPEditor(arpMsiEdit, arpFoilEdit) end function RemoveFoilARPEntry(arpFoilEdit) arpFoilEdit.objective = "remove" ARPEditor(arpFoilEdit) end appInfo = {} appInfo.msvc80x86 = {appname = "MSVC 8.0.50727.762 x86", paths = {["%Windir%/WinSxS/x86_microsoft.vc80.crt_*_8.0.50727.762_*/msvcr80.dll"] = "exists", ["%Windir%/WinSxS/x86_microsoft.vc80.crt_*_8.0.50727.762_*/msvcp80.dll"] = "exists"} } appInfo.msvc80x64 = {appname = "MSVC 8.0.50727.762 amd64", paths = {["%Windir%/WinSxS/amd64_microsoft.vc80.crt_*_8.0.50727.762_*/msvcr80.dll"] = "exists", ["%Windir%/WinSxS/amd64_microsoft.vc80.crt_*_8.0.50727.762_*/msvcp80.dll"] = "exists"} } appInfo.wis20 = {appname = "Windows Installer Service 2.0", paths = {["%System32%/msi.dll"] = "version == 2.0"} } appInfo.wis31 = {appname = "Windows Installer Service 3.1", paths = {["%System32%/msi.dll"] = "version == 3.1"} }