
CODE: [Copy to clipboard]老是提示说 无法找到文件?也就是无法顺利删除echo 清理开始程序启动项
setlocal enabledelayedexpansion
set a=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
for /f "delims= " %%i in ('reg query "%a%" ^| find "Startup"') do (
echo !str!
for /f "delims=" %%b in ('dir /b "!str!\程序\启动"') do (
if %%b neq sina.url del "!str!\程序\启动\%%b")
)
pause
CODE: [Copy to clipboard]问题二:@echo off
set "var=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
for /f "tokens=2* delims= " %%a in ('reg query "%var%"^|find /i "startup"') do (
for /f "delims=" %%i in ('dir /b "%%b\*.*"') do (
if /i not "%%i"=="sina.url" (echo del "%%i")
)
)
pause
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |