I haven't published an article before, so I'm also publishing one. Please excuse me, and I hope experts can give guidance.
How to create the desktop, the quick launch, and the shortcut menus in the program menu according to the language of the operating system? Although there are many software that support it currently, the effect is not ideal. Either the created shortcuts are restricted, or the creation is not very smooth.
In fact, it can be simply realized using batch processing...
First, create a shortcut of the program in the same directory of the folder, and set the icon and name;
Second, use keywords such as "Desktop" or "Program" to judge what language the operating system is, and then create shortcuts according to different operating systems. The sample code is as follows:
@echo off
rem Before creating the shortcut, first hide and remove the hidden attribute of the shortcut. Note that my shortcut is in the upper directory, and the name is "Microsoft Office Access2K Runtime.lnk"
ATTRIB -H ..\"Microsoft Office Access2K Runtime.lnk"
rem Use IF EXIST to judge the system language and copy the shortcut
IF EXIST "%ALLUSERSPROFILE%"\DESKTOP\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\DESKTOP\ /Y
IF EXIST "%ALLUSERSPROFILE%"\桌面\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\桌面\ /Y
IF EXIST "%ALLUSERSPROFILE%"\"「START」MENU"\PROGRAM\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\"「START」MENU"\PROGRAM\ /Y
IF EXIST "%ALLUSERSPROFILE%"\"「开始」菜单"\程序\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\"「开始」菜单"\程序\ /Y
IF EXIST "%ALLUSERSPROFILE%"\"「開始」菜單"\程序\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\"「開始」菜單"\程序\ /Y
copy ..\"Microsoft Office Access2K Runtime.lnk" "%USERPROFILE%"\"Application Data"\"Microsoft"\"Internet Explorer"\"Quick Launch"\ /Y
REM After completion, hide the shortcut.
ATTRIB +H ..\"Microsoft Office Access2K Runtime.lnk"
Explanation: How to obtain traditional Chinese characters on the simplified Chinese system: Enter the required text in WINWORD, use the simplified-traditional conversion to obtain traditional Chinese characters, and then replace them when editing the batch processing in Notepad.
Since I work in Guangdong here, I often use the traditional Chinese system. The simplified Chinese batch processing is all garbled on the traditional Chinese system, so this idea can be used to write multi-language version prompt texts, such as
IF EXIST "%ALLUSERSPROFILE%"\"「START」MENU“\ CALL EN.BAT
IF EXIST "%ALLUSERSPROFILE%"\"「开始」菜单"\ CALL CHS.BAT
IF EXIST "%ALLUSERSPROFILE%"\"「開始」菜單"\ CALL CHT.BAT
How to create the desktop, the quick launch, and the shortcut menus in the program menu according to the language of the operating system? Although there are many software that support it currently, the effect is not ideal. Either the created shortcuts are restricted, or the creation is not very smooth.
In fact, it can be simply realized using batch processing...
First, create a shortcut of the program in the same directory of the folder, and set the icon and name;
Second, use keywords such as "Desktop" or "Program" to judge what language the operating system is, and then create shortcuts according to different operating systems. The sample code is as follows:
@echo off
rem Before creating the shortcut, first hide and remove the hidden attribute of the shortcut. Note that my shortcut is in the upper directory, and the name is "Microsoft Office Access2K Runtime.lnk"
ATTRIB -H ..\"Microsoft Office Access2K Runtime.lnk"
rem Use IF EXIST to judge the system language and copy the shortcut
IF EXIST "%ALLUSERSPROFILE%"\DESKTOP\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\DESKTOP\ /Y
IF EXIST "%ALLUSERSPROFILE%"\桌面\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\桌面\ /Y
IF EXIST "%ALLUSERSPROFILE%"\"「START」MENU"\PROGRAM\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\"「START」MENU"\PROGRAM\ /Y
IF EXIST "%ALLUSERSPROFILE%"\"「开始」菜单"\程序\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\"「开始」菜单"\程序\ /Y
IF EXIST "%ALLUSERSPROFILE%"\"「開始」菜單"\程序\ copy ..\"Microsoft Office Access2K Runtime.lnk" "%ALLUSERSPROFILE%"\"「開始」菜單"\程序\ /Y
copy ..\"Microsoft Office Access2K Runtime.lnk" "%USERPROFILE%"\"Application Data"\"Microsoft"\"Internet Explorer"\"Quick Launch"\ /Y
REM After completion, hide the shortcut.
ATTRIB +H ..\"Microsoft Office Access2K Runtime.lnk"
Explanation: How to obtain traditional Chinese characters on the simplified Chinese system: Enter the required text in WINWORD, use the simplified-traditional conversion to obtain traditional Chinese characters, and then replace them when editing the batch processing in Notepad.
Since I work in Guangdong here, I often use the traditional Chinese system. The simplified Chinese batch processing is all garbled on the traditional Chinese system, so this idea can be used to write multi-language version prompt texts, such as
IF EXIST "%ALLUSERSPROFILE%"\"「START」MENU“\ CALL EN.BAT
IF EXIST "%ALLUSERSPROFILE%"\"「开始」菜单"\ CALL CHS.BAT
IF EXIST "%ALLUSERSPROFILE%"\"「開始」菜單"\ CALL CHT.BAT
