From 948a07074fc9edb5d0cc822a141b9f29381c1a4b Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Sun, 1 Dec 2013 10:21:53 +0100 Subject: If PowerShell is not available, a proper message is now displayed when installing on Windows without admin priviledges --- install.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.bat b/install.bat index 22f72e13..11558f7f 100644 --- a/install.bat +++ b/install.bat @@ -491,6 +491,10 @@ check_flags() if not permission() then if not NOADMIN then -- must elevate the process with admin priviledges + if not exec("PowerShell /? >NUL 2>&1") then + -- powershell is not available, so error out + die("No administrative priviledges detected and cannot auto-elevate. Please run with admin priviledges or use the /NOADMIN switch") + end print("Need admin priviledges, now elevating a new process to continue installing...") local runner = os.getenv("TEMP").."\\".."LuaRocks_Installer.bat" local f = io.open(runner, "w") -- cgit v1.2.3-55-g6feb