如何让cmd重复执行同一个命令?(超高悬赏) - 爱问答

(爱问答)

如何让cmd重复执行同一个命令?(超高悬赏)

不停地执行,执行完了继续。帮我做一个,命令是:  dir/s


还有bat的:


color 2f

 

@echo off

 

>nul 2>&1 "%SYSTEMROOT%system32cacls.exe" "%SYSTEMROOT%system32configsystem"

 

if '%errorlevel%' NEQ '0' (

 

echo 请求管理员权限...

 

goto UACPrompt

 

) else ( goto gotAdmin )

 

:UACPrompt

 

echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%getadmin.vbs"

 

echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%getadmin.vbs"

 

"%temp%getadmin.vbs"

 

exit /B

 

:gotAdmin

 

chkdsk

 

@echo off

echo 正在清除系统垃圾文件,请稍等......

del /f /s /q  C:UsersAdministratorAppDataLocalTemp*.*

del /f /s /q C:UsersAdministratorAppDataLocalTemp

rd /s/q C:UsersAdministratorAppDataLocalTemp

del /f /s /q  %systemdrive%*.tmp

del /f /s /q  %systemdrive%*._mp

del /f /s /q  %systemdrive%*.log

del /f /s /q  %systemdrive%*.gid

del /f /s /q  %systemdrive%*.chk

del /f /s /q  %systemdrive%*.old

del /f /s /q  %systemdrive% ecycled*.*

del /f /s /q  %windir%*.bak

del /f /s /q  %windir%prefetch*.*

rd /s /q %windir% emp & md  %windir% emp

del /f /q  %userprofile%cookies*.*

del /f /q  %userprofile% ecent*.*

del /f /s /q  "%userprofile%Local SettingsTemporary Internet Files*.*"

del /f /s /q  "%userprofile%Local SettingsTemp*.*"

del /f /s /q  "%userprofile% ecent*.*"

del /f /s /q  %systemdrive%*.tmp

del /f /s /q  %systemdrive%*._mp

del /f /s /q  %systemdrive%*.log

del /f /s /q  %systemdrive%*.gid

del /f /s /q  %systemdrive%*.chk

del /f /s /q  %systemdrive%*.old

del /f /s /q  %systemdrive% ecycled*.*

del /f /s /q  %windir%*.bak

del /f /s /q  %windir%prefetch*.*

rd /s /q %windir% emp & md  %windir% emp

del /f /q  %userprofile%cookies*.*

del /f /q  %userprofile% ecent*.*

del /f /s /q  "%userprofile%Local SettingsTemporary Internet Files*.*"

del /f /s /q  "%userprofile%Local SettingsTemp*.*"

del /f /s /q  "%userprofile% ecent*.*"

del/f /s /q %systemdrive%*.tmp

del/f /s /q %systemdrive%*._mp

del/f /s /q %systemdrive%*.log

del/f /s /q %systemdrive%*.gid

del/f /s /q %systemdrive%*.chk

del/f /s /q %systemdrive%*.old

del/f /s /q %systemdrive% ecycled*.*

del/f /s /q %windir%*.bak

del/f /s /q %windir%prefetch*.*

rd /s /q %windir% emp & md %windir% emp

del/f /q %userprofile%cookies*.*

del/f /q %userprofile% ecent*.*

del/f /s /q "%userprofile%Local SettingsTemporary Internet Files*.*"

del/f /s /q "%userprofile%Local SettingsTemp*.*"

del/f /s /q "%userprofile% ecent*.*"

reg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Cache>%temp%cleantmp.txt

reg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Cookies>>%temp%cleantmp.txt

reg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v History>>%temp%cleantmp.txt

reg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v NetHood>>%temp%cleantmp.txt

reg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Recent>>%temp%cleantmp.txt

for /f "tokens=3*" %%a in (%temp%cleantmp.txt) do (

for /d %%i in ("%%a %%b*.*") do rd /s /q "%%i"

del /a /f /s /q "%%a %%b*.*"

)

del /a /f /s /q "%userprofile%Locals~1Tempor~1*.*"

del /a /f /s /q "%userprofile%Locals~1Temp*.*"

del /a /f /s /q "%userprofile%cookies*.*"

del /a /f /s /q "%userprofile% ecent*.*"

del /a /f /s /q "%Temp%*.*"

del /a /f /s /q "%Tmp%*.*"

del /a /f /s /q "%HomePath%..IconCache.db"

del /a /f /s /q "%SystemRoot%*._mp"

del /a /f /s /q "%SystemRoot%*.bak"

del /a /f /s /q "%SystemRoot%*.dmp"

del /a /f /s /q "%SystemRoot%*.gid"

del /a /f /s /q "%SystemRoot%*.old"

del /a /f /s /q "%SystemRoot%*.query"

del /a /f /q "%SystemRoot%*.tmp"

rd /s /q "%SystemRoot%Downloaded Program Files"

rd /s /q "%SystemRoot%Offline Web Pages"

rd /s /q "%systemroot%Connection Wizard"

rd /s /q "%SystemRoot%SoftwareDistributionDownload"

rd /s /q "%SystemRoot%Assembly"

rd /s /q "%SystemRoot%Help"

rd /s /q "%SystemRoot%ReinstallBackups"

del /a /s /q "%SystemRoot%inf*.pnf"

del /a /f /s /q "%SystemRoot%infInfCache.1"

dir %SystemRoot%inf*.* /ad/b >%SystemRoot%vTmp.txt

for /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemRoot%inf%%a"

del /a /f /s /q "%SystemRoot%driver?*.pnf"

del /a /f /s /q "%SystemRoot%driver?InfCache.1"

del /a /f /s /q "%SystemDrive%driver?*.pnf"

del /a /f /s /q "%SystemDrive%driver?InfCache.1"

rd /s /q "%SystemRoot% emp" & md "%SystemRoot% emp"

del /a /f /s /q "%SystemRoot%Prefetch*.*"

del /a /f /s /q "%SystemRoot%minidump*.*"

del /a /f /q "%SystemDrive%*.chk"

dir %SystemDrive%found.??? /ad/b >%SystemRoot%vTmp.txt

for /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemDrive%%%a"

dir %SystemRoot%$*$ /ad/b >%SystemRoot%vTmp.txt

for /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemRoot%%%a"

rd /s /q "%ProgramFiles%InstallShield Installation Information"

Ren "%ProgramFiles%Common~1RealUpdate_OB ealsched.exe" realsched.ex_

Del "%ProgramFiles%Common~1RealUpdate_OB ealsched.exe"

Reg Delete "HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun" /v TkBellExe /f

rd /s /q "%ProgramFiles%TencentqqGameDownload"

taskkill /f /im "TIMPlatform.exe" /t

del /a /f /s /q "%ProgramFiles%TencentqqTIMPlatform.exe"

del /a /f /s /q "%ProgramFiles%Kaspersky Lab*.tmp"

del /f /s /q  %systemdrive%*.tmp

del /f /s /q  %systemdrive%*._mp

del /f /s /q  %systemdrive%*.log

del /f /s /q  %systemdrive%*.gid

del /f /s /q  %systemdrive%*.chk

del /f /s /q  %systemdrive%*.old

del /f /s /q  %systemdrive% ecycled*.*

del /f /s /q  %windir%*.bak

del /f /s /q  %windir%prefetch*.*

rd /s /q %windir% emp & md  %windir% emp

del /f /q  %userprofile%cookies*.*

del /f /q  %userprofile% ecent*.*

del /f /s /q  "%userprofile%Local SettingsTemporary Internet Files*.*"

del /f /s /q  "%userprofile%Local SettingsTemp*.*"

del /f /s /q  "%userprofile% ecent*.*"

你可以使用%0|%0这条命令

可以无限执行自身,不过无限执行可能会使电脑占用过大而崩溃


下一篇:电脑配置价钱

上一篇:大佬们这个电脑怎么样。朋友送的,我不太懂

热门标签:
excel 网盘 破解 word dll
最新更新:
微软重新评估新的Outlook的使用时机 联想推出搭载联发科Helio G80芯片组的Tab M9平板 英特尔创新大赛时间确定! 微软Edge浏览器在稳定渠道中推出Workspaces功能 英伟达RTX4060TiGPU推出MaxSun动漫主题! 谷歌地图为用户提供了街景服务! GameSir 在T4 Kaleid中推出了一款出色的控制器! 微软开始在Windows 11 中测试其画图应用程序的新深色模式! LG电子推出全球首款无线OLED电视 英伟达人工智能芯片崭露头角! Steam Deck可以玩什么游戏-Steam Deck价格限时优惠 雷蛇推出CobraPro鼠标 Kindle电子阅读器可以访问谷歌商店吗 Windows10如何加入组策略 window10图片查看器怎么没有了?