anchor.diff:  	echo  ! Server operating system detected.
   	echo    Removing built-in media files ^(.wav, .midi, etc^)...
   	echo.
  -	echo. >> %LOGPATH%\%LOGFILE% && echo  ! Server operating system detected. Removing built-in media files ^(.wave, .midi, etc^)...>> %LOGPATH%\%LOGFILE% && echo. >> %LOGPATH%\%LOGFILE%
  +	echo. >> "%LOGPATH%\%LOGFILE%" && echo  ! Server operating system detected. Removing built-in media files ^(.wave, .midi, etc^)...>> "%LOGPATH%\%LOGFILE%" && echo. >> "%LOGPATH%\%LOGFILE%"
   
   	:: 2. Take ownership of the files so we can actually delete them. By default even Administrators have Read-only rights.
   	echo    Taking ownership of %WINDIR%\Media in order to delete files... && echo.
  -	echo    Taking ownership of %WINDIR%\Media in order to delete files... >> %LOGPATH%\%LOGFILE% && echo. >> %LOGPATH%\%LOGFILE%
  -	if exist %WINDIR%\Media takeown /f %WINDIR%\Media /r /d y >> %LOGPATH%\%LOGFILE% 2>NUL && echo. >> %LOGPATH%\%LOGFILE%
  -	if exist %WINDIR%\Media icacls %WINDIR%\Media /grant administrators:F /t >> %LOGPATH%\%LOGFILE% && echo. >> %LOGPATH%\%LOGFILE%
  +	echo    Taking ownership of %WINDIR%\Media in order to delete files... >> "%LOGPATH%\%LOGFILE%" && echo.>> "%LOGPATH%\%LOGFILE%"
  +	if exist %WINDIR%\Media takeown /f %WINDIR%\Media /r /d y >> "%LOGPATH%\%LOGFILE%" 2>NUL && echo.>> "%LOGPATH%\%LOGFILE%"
  +	if exist %WINDIR%\Media icacls %WINDIR%\Media /grant administrators:F /t >> "%LOGPATH%\%LOGFILE%" && echo.>> "%LOGPATH%\%LOGFILE%"
   
   	:: 3. Do the cleanup
  -	rmdir /S /Q %WINDIR%\Media>> %LOGPATH%\%LOGFILE% 2>NUL
  +	rmdir /S /Q %WINDIR%\Media>> "%LOGPATH%\%LOGFILE%" 2>NUL
   
   	echo    Done.
   	echo.
  -	echo    Done. >> %LOGPATH%\%LOGFILE%
  -	echo. >> %LOGPATH%\%LOGFILE%
  +	echo    Done.>> "%LOGPATH%\%LOGFILE%"
  +	echo.>> "%LOGPATH%\%LOGFILE%"
   	)
   
   :: JOB: Windows CBS logs
   ::      these only exist on Vista and up, so we look for "Microsoft", and assuming we don't find it, clear out the folder
   echo %WIN_VER%  | findstr /i /%SystemDrive%"server" >NUL
  -if not %ERRORLEVEL%==0 del /F /Q %WINDIR%\Logs\CBS\* >> %LOGPATH%\%LOGFILE% 2>NUL
  +if not %ERRORLEVEL%==0 del /F /Q %WINDIR%\Logs\CBS\* >> "%LOGPATH%\%LOGFILE%" 2>NUL
   
   :: JOB: Windows XP/2003: Cleanup hotfix uninstallers. They use a lot of space so removing them is beneficial.
   :: Really we should use a tool that deletes their corresponding registry entries, but oh well.
  
positive.code: 
  :: JOB: Disable Windows Tour bubble popup (Windows XP only; new user accounts only)
  if /i "%WIN_VER:~0,9%"=="Microsoft" reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Applets\Tour" /v RunCount /t REG_DWORD /d 00000000 /f
  	
  :: JOB: Windows Server: remove built-in media files (all Server versions)
  echo %WIN_VER%  | findstr /i /%SystemDrive%"server" >NUL
  if %ERRORLEVEL%==0 (
  
negative.code: 	:: 3. Do the hotfix clean up
  	for /f %%i in (%TEMP%\hotfix_nuke_list.txt) do (
  		echo Deleting %%i...
  		echo Deleted folder %%i>> "%LOGPATH%\%LOGFILE%"
  		rmdir /S /Q %%i >> "%LOGPATH%\%LOGFILE%" 2>NUL
  		)
  
  	:: 4. Log that we are done with hotfix cleanup and leave the Windows directory
  	echo    Done. >> "%LOGPATH%\%LOGFILE%" && echo.>> %LOGPATH%\%LOGFILE%
  	echo    Done.
  	del %TEMP%\hotfix_nuke_list.txt>> %LOGPATH%\%LOGFILE%
  	echo.
  