@ECHO ON
set TOM982=%USERPROFILE%\Desktop\tom982
rmdir %TOM982%
mkdir %TOM982%
echo %appdata% > %TOM982%\appdata.txt
regedit.exe /e %TOM982%\shellfolders.txt "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
regedit.exe /e %TOM982%\usershellfolders.txt "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
regedit.exe /e %TOM982%\volatileenvironment.txt "HKEY_CURRENT_USER\Volatile Environment"
regedit.exe /e %TOM982%\hkuusershell.txt "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
set ZIPFOLDER=%USERPROFILE%\Desktop\tom982\*.*
set TEMPDIR=%SYSTEMDRIVE%\tom982temp
rmdir %TEMPDIR%
mkdir %TEMPDIR%
copy %ZIPFOLDER% %TEMPDIR%
echo Set objArgs = WScript.Arguments > tom982zipfile.vbs
echo InputFolder = objArgs(0) >> tom982zipfile.vbs
echo ZipFile = objArgs(1) >> tom982zipfile.vbs
echo CreateObject("Scripting.FileSystemObject").CreateTextFile(ZipFile, True).Write "PK" ^& Chr(5) ^& Chr(6) ^& String(18, vbNullChar) >> tom982zipfile.vbs
echo Set objShell = CreateObject("Shell.Application") >> tom982zipfile.vbs
echo Set source = objShell.NameSpace(InputFolder).Items >> tom982zipfile.vbs
echo objShell.NameSpace(ZipFile).CopyHere(source) >> tom982zipfile.vbs
echo wScript.Sleep 2000 >> tom982zipfile.vbs
CScript tom982zipfile.vbs %TEMPDIR% %USERPROFILE%\Desktop\tom982.zip
del /F /Q %TEMPDIR%\*.*
del /F /Q %USERPROFILE%\Desktop\tom982zipfile.vbs
del /F /Q %TOM982%\*.*
rmdir /S /Q %USERPROFILE%\Desktop\tom982
rmdir /S /Q %TEMPDIR%
mkdir %SYSTEMDRIVE%\tom982backup
set TOM982BACKUP=%SYSTEMDRIVE%\tom982backup
copy %USERPROFILE%\Desktop\tom982.zip %TOM982BACKUP%\tom982.zip
copy %USERPROFILE%\Desktop\TOM982.bat %TOM982BACKUP%\TOM982.bat
echo msgbox"A file, tom982.zip, has been created on your desktop, please attach this with your next post. If this file is not there, a backup has been saved elsewhere - both locations will now open",64,"Process completed!" >> popup.vbs
WScript.exe popup.vbs
del popup.vbs
%SYSTEMROOT%\explorer.exe "%TOM982BACKUP%"
%SYSTEMROOT%\explorer.exe "%USERPROFILE%\Desktop"
echo msgbox"To finish off the deletion process, explorer.exe must be restarted. Pressing OK will restart explorer",64,"Nearly done" >> popup.vbs
WScript.exe popup.vbs
del popup.vbs
TASKKILL /IM explorer.exe /F
start explorer.exe
echo msgbox"This process has completed, please return to the forum for further instruction",64,"All done" >> popup2.vbs
WScript.exe popup2.vbs
del popup2.vbs
end