anchor.diff:  ECHO PAUSE ^> NUL                               >> "%TMPFILE%"
   ECHO DEL "%TMPFILE%"                            >> "%TMPFILE%"
   
  -ECHO Now retrying as a priviledged user...
  +ECHO Now retrying as a privileged user...
   PowerShell -Command (New-Object -com 'Shell.Application').ShellExecute('%TMPFILE%', '', '', 'runas')
   
   :EXITLR
  
positive.code: 
  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")
  		f:write("@echo off\n")
  
negative.code: 	return exec([[.\win32\tools\mkdir -p "]]..dir..[[" >NUL]])
  end
  
  -- does the current user have admin privileges ( = elevated)
  local function permission()
  	return exec("net session >NUL 2>&1") -- fails if not admin
  end
  