我的同事创建了一个批处理文件,当我们将它作为批处理文件运行时,它可以正常工作 但是当我们将它作为.exe文件运行时会发生错误。
我们使用IEXPRESS将批处理文件转换为.exe文件
显示的错误是“Out of environment space switch - / q”
(我认为错误发生在删除临时文件的部分)
任何帮助或帮助都将受到高度赞赏
@echo off
c:\
ipconfig /flushdns
nbtstat -r
nbtstat -R
nbtstat -c
net start
gpupdate /force
rem cd %userprofile%\appdata\local\temp
set Tempfile=C:\Users\%USERNAME%\AppData\Local\TEMP
del /q /s /f "%Tempfile%"
rem del C:\Users\%USERNAME%\AppData\Local\TEMP /Q
rem Delete Temporary Internet Files
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
rem Delete Cookies
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
rem Delete History
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
rem Delete Form Data
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
rem Delete Passwords
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
rem Delete All
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
rem Delete All – “Also delete files and settings stored by add-ons”
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
set DataDir=C:\Users\%USERNAME%\AppData\Local\Microsoft\Intern~1
del /q /s /f "%DataDir%"
rem rd /s /q "%DataDir%"
set History=C:\Users\%USERNAME%\AppData\Local\Microsoft\Windows\History
del /q /s /f "%History%"
rem rd /s /q "%History%"
set IETemp=C:\Users\%USERNAME%\AppData\Local\Microsoft\Windows\Tempor~1
del /q /s /f "%IETemp%"
rem rd /s /q "%IETemp%"
set Cookies=C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Cookies
del /q /s /f "%Cookies%"
rem rd /s /q "%Cookies%"
rem C:\bin\regdelete.exe HKEY_CURRENT_USER "Software\Microsoft\Internet Explorer"