From 7be0259a5187143abf2ae798ff0ca5720c15dc3d Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 26 Nov 2021 08:01:30 +0800 Subject: Update main.lua --- xmake/actions/update/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua index 7437606fa..94ea1b7aa 100644 --- a/xmake/actions/update/main.lua +++ b/xmake/actions/update/main.lua @@ -158,6 +158,7 @@ function _install(sourcedir) if os.isfile(win_installer_name) then -- /D sets the default installation directory ($INSTDIR), overriding InstallDir and InstallDirRegKey. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. Only absolute paths are supported. local params = ("/D=" .. os.programdir()):split("%s", { strict = true }) + -- @see https://github.com/xmake-io/xmake/issues/1576 local no_admin = try {function () return winos.registry_query("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\XMake;NoAdmin") end} if no_admin == nil then no_admin = try {function () return winos.registry_query("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\XMake;NoAdmin") end} -- cgit v1.3.1