![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-02 09:28 |
48,037 topics / 350,122 posts / today 0 new / 48,250 members |
| DOS批处理 & 脚本技术(批处理室) » Help! About the desktop variables in XP, creating shortcuts on the desktop. |
| Printable Version 1,521 / 6 |
| Floor1 iovf | Posted 2006-10-19 09:57 |
| 初级用户 Posts 8 Credits 140 | |
|
Want to make a batch script that automatically adds shortcuts to the desktop. The Chinese version's desktop is "桌面", and the Korean version is "바탕 화면". Well, just use "desktop" for both. Hate Microsoft. Now the idea is like this. In the registry, under HKLM\SOFTWARE\Classes\CLSID\{00021400-0000-0000-C000-000000000046}, there is the name of the desktop. Then do reg EXport HKLM\SOFTWARE\Classes\CLSID\{00021400-0000-0000-C000-000000000046} TEMP.REG, REN TEMP.REG TEMP_BAK.REG, TYPE TEMP_BAK.REG >TEMP.TXT, DEL TEMP_BAK.REG. The content of TEMP.TXT is:
Windows Registry Editor Version 5.00 @="桌面" @="shell32.dll" "ThreadingModel"="Apartment" And so on. How to get the text inside the two quotes of @="桌面" into a variable. Please help everyone! [ Last edited by namejm on 2006-10-22 at 06:46 ] |
|
| Floor2 lxmxn | Posted 2006-10-19 11:03 |
| 版主 Posts 4,938 Credits 11,386 | |
|
The code has not been tested. Please post if there is any issue. |
|
| Floor3 NaturalJ0 | Posted 2006-10-19 21:52 |
| 银牌会员 Posts 533 Credits 1,181 | |
|
It's considered that the function is completed, but I'm still not completely satisfied. Let's see what other experts have.
See if there's a way to not generate the temporary file temp.reg and a way to not use the extra intermediate variable skipline. To ensure no mistakes, the method used is: locate the line where is, and then take from the next line of it. [ Last edited by NaturalJ0 on 2006-10-19 at 23:12 ] |
|
| Floor4 iovf | Posted 2006-10-20 10:31 |
| 初级用户 Posts 8 Credits 140 | |
|
Floor 2.
Chinese version passed. For other language versions... The Korean version has spaces in it... Still thank you all! |
|
| Floor5 lxmxn | Posted 2006-10-20 10:33 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Hehe, I didn't explain. My test environment is Windows XP SP2 Chinese version. I don't know what version you are using.
|
|
| Floor6 iovf | Posted 2006-10-22 04:32 |
| 初级用户 Posts 8 Credits 140 | |
|
My one is Server 2003 SP1 Korean version
XP SP2 Chinese version The code on the 3rd floor is okay :) Thanks! |
|
| Floor7 lxmxn | Posted 2006-10-22 05:54 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Hehe, there is a "('FIND /I "Desktop" TEMP.TXT')" in my code, which contains the Chinese character "Desktop", so it won't work on the Korean version of the system... Still, Brother NaturalJ0's code in F3 is more universal. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |