[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
Hi
試試看
  1. @echo off
  2. cls
  3. if exist "%usersprofile%\「開始」功能表\程式集" (
  4. icacls "%usersprofile%\「開始」功能表\程式集" /grant administrators:f >nul
  5. del "%usersprofile%\「開始」功能表\程式集\?.lnk"
  6. ) else (
  7. if exist "%usersprofile%\start menu\programs" (
  8. icacls "%usersprofile%\start menu\programs" /grant administrators:f >nul
  9. del "%usersprofile%\start menu\programs\?.lnk"
  10. ) else (
  11. echo. 沒有指定的檔案
  12. )
  13. )
  14. pause
复制代码

TOP

Hi
提供代碼給做參考:
  1. @echo off
  2. for /f "tokens=2,* delims==" %%i in ('wmic os get /value ^| findstr "oslanguage"') do set lang=%%i
  3. if "%lang%"=="1033" goto english
  4. if "%lang%"=="2052" goto chinese
  5. goto end
  6. :chinese
  7. if exist "%usersprofile%\「開始」功能表\程式集" (
  8. icacls "%usersprofile%\「開始」功能表\程式集" /grant administrators:f >nul
  9. del "%usersprofile%\「開始」功能表\程式集\*.lnk"
  10. ) else (
  11. echo. 找不到刪除的檔案!
  12. )
  13. :english
  14. if exist "%usersprofile%\start menu\programs" (
  15. icacls "%usersprofile%\start menu\programs" /grant administrators:f >nul
  16. del "%usersprofile%\start menu\programs\*.lnk"
  17. ) else (
  18. echo. Deleted files not found
  19. )
  20. :end
  21. exit
复制代码

TOP

返回列表