![]() |
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-09-23 12:21 |
47,812 topics / 349,917 posts / today 0 new / 48,273 members |
| DOS批处理 & 脚本技术(批处理室) » [Solved] Ask about creating a shortcut with parameters in batch processing |
| Printable Version 3,839 / 9 |
| Floor1 hbby | Posted 2016-07-03 17:54 |
| 中级用户 Posts 99 Credits 220 | |
|
Please provide the English translation of the above Chinese content according to the requirements. The original text in Chinese is as follows:
请问各位朋友,我想创建一个快捷方式,代码如下: mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\连接.lnk""):b.TargetPath=""%windir%\System32\rasdial.exe"":b.Arguments=""VPN admin 88888"":b.WorkingDirectory=""%windir%\System32"":b.Save:close") 这个快捷方式可以成功创建。 但是我想修改参数:b.Arguments=""VPN admin 88888""中的VPN为"VPN 01",最后想在快捷方式中呈现为C:\Windows\System32\rasdial.exe "VPN 01" admin 88888,代码如下: mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\连接.lnk""):b.TargetPath=""%windir%\System32\rasdial.exe"":b.Arguments="""VPN 01" admin 88888"":b.WorkingDirectory=""%windir%\System32"":b.Save:close") 以上参数多加个双引号创建不能成功,请朋友们指教下,如何修改参数可以增加双引号,谢谢! [ Last edited by hbby on 2016-7-3 at 20:47 ] The translated English text is: Dear friends, I want to create a shortcut. The code is as follows: mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Connection.lnk""):b.TargetPath=""%windir%\System32\rasdial.exe"":b.Arguments=""VPN admin 88888"":b.WorkingDirectory=""%windir%\System32"":b.Save:close") This shortcut can be successfully created. But I want to modify the parameter: change VPN in b.Arguments=""VPN admin 88888"" to "VPN 01", and finally want it to appear in the shortcut as C:\Windows\System32\rasdial.exe "VPN 01" admin 88888. The code is as follows: mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Connection.lnk""):b.TargetPath=""%windir%\System32\rasdial.exe"":b.Arguments="""VPN 01" admin 88888"":b.WorkingDirectory=""%windir%\System32"":b.Save:close") The above parameter with an extra pair of quotes cannot be created successfully. Please friends give some advice on how to modify the parameter to add the quotes. Thank you! [ Last edited by hbby on 2016-7-3 at 20:47 ] |
|
| Floor2 hbby | Posted 2016-07-03 20:46 |
| 中级用户 Posts 99 Credits 220 | |
|
b.Arguments="""VPN 01"" admin 88888"
|
|
| Floor3 zzz19760225 | Posted 2016-07-05 04:49 |
| 超级版主 Posts 2,020 Credits 3,673 | |
|
Registered in 2005, all are ten-year-old old farts.
|
|
| Floor4 5872169 | Posted 2017-07-21 17:42 |
| 高级用户 Posts 474 Credits 959 | |
|
The old goblin doesn't know where to go now, all gone
|
|
| Floor5 5872169 | Posted 2017-07-21 17:44 |
| 高级用户 Posts 474 Credits 959 | |
|
I'm a ten-year-old old monster, and all my old friends are gone
|
|
| Floor6 zzz19760225 | Posted 2017-07-21 19:27 |
| 超级版主 Posts 2,020 Credits 3,673 | |
|
Maybe it's not that it's gone, but that life has become rich and one has become a fatty. The wind from yesterday still occasionally blows in dreams
The other is that after many years of youth, one has turned into an old man. Facing yesterday, except for emotion, one doesn't know what to say, or unconsciously wants to avoid something What I care more about is whether those forum experts with rich experience and skills today have more content than back then regarding an idea of analyzing the original DOS code and rebuilding one |
|
| Floor7 zzz19760225 | Posted 2017-07-21 19:29 |
| 超级版主 Posts 2,020 Credits 3,673 | |
|
Because I want to have such a DOS, although I am a DOS newbie
|
|
| Floor8 wiq | Posted 2017-09-21 09:58 |
| 初级用户 Posts 35 Credits 179 | |
|
Let me see. The user's input is "看看我是不是老妖精", which translates to "Let's see if I'm an old monster".
|
|
| Floor9 wiq | Posted 2017-09-21 09:59 |
| 初级用户 Posts 35 Credits 179 | |
|
A 14-year-old old hand, but still a newbie in batch processing. Learned a lot of knowledge in this forum, and the operation and maintenance work is more worry-free. Thanks everyone!
|
|
| Floor10 zzz19760225 | Posted 2017-09-21 13:24 |
| 超级版主 Posts 2,020 Credits 3,673 | |
Originally posted by wiq at 2017-9-21 09:58: How could I remember the password in 2003 |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |