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