China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 10:17
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Solved] Ask about creating a shortcut with parameters in batch processing View 3,656 Replies 9
Original Poster Posted 2016-07-03 17:54 ·  中国 江西 南昌 移动
中级用户
★★
Credits 220
Posts 99
Joined 2005-08-16 01:08
20-year member
UID 41691
Status Offline
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 ]
Floor 2 Posted 2016-07-03 20:46 ·  中国 江西 南昌 电信
中级用户
★★
Credits 220
Posts 99
Joined 2005-08-16 01:08
20-year member
UID 41691
Status Offline
b.Arguments="""VPN 01"" admin 88888"
Floor 3 Posted 2016-07-05 04:49 ·  中国 上海 徐汇区 联通
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Registered in 2005, all are ten-year-old old farts.
1<词>,2,3/段\,4{节},5(章)。
Floor 4 Posted 2017-07-21 17:42 ·  中国 山东 济南 联通
高级用户
★★★
Credits 959
Posts 474
Joined 2007-10-25 10:40
18-year member
UID 100716
Gender Male
Status Offline
The old goblin doesn't know where to go now, all gone
Floor 5 Posted 2017-07-21 17:44 ·  中国 山东 济南 联通
高级用户
★★★
Credits 959
Posts 474
Joined 2007-10-25 10:40
18-year member
UID 100716
Gender Male
Status Offline
I'm a ten-year-old old monster, and all my old friends are gone
Floor 6 Posted 2017-07-21 19:27 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
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
1<词>,2,3/段\,4{节},5(章)。
Floor 7 Posted 2017-07-21 19:29 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Because I want to have such a DOS, although I am a DOS newbie
1<词>,2,3/段\,4{节},5(章)。
Floor 8 Posted 2017-09-21 09:58 ·  中国 上海 联通
初级用户
Credits 179
Posts 35
Joined 2003-06-03 00:00
23-year member
UID 3055
Gender Male
Status Offline
Let me see. The user's input is "看看我是不是老妖精", which translates to "Let's see if I'm an old monster".
Floor 9 Posted 2017-09-21 09:59 ·  中国 上海 联通
初级用户
Credits 179
Posts 35
Joined 2003-06-03 00:00
23-year member
UID 3055
Gender Male
Status Offline
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!
Floor 10 Posted 2017-09-21 13:24 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Originally posted by wiq at 2017-9-21 09:58:
Am I an old monster


How could I remember the password in 2003
1<词>,2,3/段\,4{节},5(章)。
Forum Jump: