diff options
| -rw-r--r-- | install.bat | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/install.bat b/install.bat index 22f72e13..11558f7f 100644 --- a/install.bat +++ b/install.bat | |||
| @@ -491,6 +491,10 @@ check_flags() | |||
| 491 | if not permission() then | 491 | if not permission() then |
| 492 | if not NOADMIN then | 492 | if not NOADMIN then |
| 493 | -- must elevate the process with admin priviledges | 493 | -- must elevate the process with admin priviledges |
| 494 | if not exec("PowerShell /? >NUL 2>&1") then | ||
| 495 | -- powershell is not available, so error out | ||
| 496 | die("No administrative priviledges detected and cannot auto-elevate. Please run with admin priviledges or use the /NOADMIN switch") | ||
| 497 | end | ||
| 494 | print("Need admin priviledges, now elevating a new process to continue installing...") | 498 | print("Need admin priviledges, now elevating a new process to continue installing...") |
| 495 | local runner = os.getenv("TEMP").."\\".."LuaRocks_Installer.bat" | 499 | local runner = os.getenv("TEMP").."\\".."LuaRocks_Installer.bat" |
| 496 | local f = io.open(runner, "w") | 500 | local f = io.open(runner, "w") |
