anchor.diff:    PATH     :   $LUA_BINDIR
     PATHEXT  :   .LUA
   LuaRocks;
  -  PATH     :   $FULL_PREFIX
  -  LUA_PATH :   $FULL_PREFIX\lua\?.lua;$FULL_PREFIX\lua\?\init.lua
  +  PATH     :   $PREFIX
  +  LUA_PATH :   $PREFIX\lua\?.lua;$PREFIX\lua\?\init.lua
   Local user rocktree (Note: %APPDATA% is user dependent);
     PATH     :   %APPDATA%\LuaRocks\bin
     LUA_PATH :   %APPDATA%\LuaRocks\share\lua\$LUA_VERSION\?.lua;%APPDATA%\LuaRocks\share\lua\$LUA_VERSION\?\init.lua
  
positive.code: 	-- expand template with correct path information
  	print()
  	print([[Loading registry information for ".rockspec" files]])
  	exec( S[[win32\lua5.1\bin\lua5.1.exe "$FULL_PREFIX\LuaRocks.reg.lua" "$FULL_PREFIX\LuaRocks.reg.template"]] )
  	exec( S[[regedit /S "$FULL_PREFIX\\LuaRocks.reg"]] )
  end
  
  -- ***********************************************************
  -- Cleanup
  -- ***********************************************************
  -- remove regsitry related files, no longer needed
  exec( S[[del "$FULL_PREFIX\LuaRocks.reg.*" >NUL]] )
  -- remove pe-parser module
  exec( S[[del "$FULL_PREFIX\pe-parser.lua" >NUL]] )
  
  -- ***********************************************************
  -- Exit handlers 
  
negative.code:     temppath = os.getenv("temp").."\\LR-config-backup-"..tostring(math.random(10000))
      if exists(temppath) then temppath = nil end
    end
    vars.CONFBACKUPDIR = temppath
    mkdir(vars.CONFBACKUPDIR)
    exec(S[[COPY "$PREFIX\config*.*" "$CONFBACKUPDIR" >NUL]])
    exec(S[[COPY "$PREFIX\lua\luarocks\site_config*.*" "$CONFBACKUPDIR" >NUL]])
  end
  
  -- restore previously backed up config files
  local function restore_config_files()
    if not vars.CONFBACKUPDIR then return end -- there is no backup to restore
    exec(S[[COPY "$CONFBACKUPDIR\config*.*" "$PREFIX" >NUL]])
    exec(S[[COPY "$CONFBACKUPDIR\site_config*.*" "$PREFIX\lua\luarocks" >NUL]])
    -- cleanup
    exec(S[[RD /S /Q "$CONFBACKUPDIR"]])
    vars.CONFBACKUPDIR = nil
  