Sign in to follow this  
Followers 0
czyt

Create shortcut for dial-up adapter

4 posts in this topic

I came across this,It seems that Filecreateshort not work for this.As I use Chinese OS,so for your better-understanding,I got a post in English .

http://social.technet.microsoft.com/Forums/scriptcenter/en-US/3d521828-6935-4e3e-acd5-d61d6005490b/need-script-to-create-a-desktop-shortcut-to-a-dialup-adapter

post-70440-0-03064500-1386689555_thumb.g


董小姐,你微笑的时候很美,就像安河桥下,清澈的水...

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You might be better served by making an executable that calls the Dial-Up Network by name. Not sure if this is what you were looking for, but I hope it helps some.



Global $strConnectionName = 'Dial-up Connection' ; The actual name of the DUN Connection
Run(@ComSpec & ' /c %Systemroot%\System32\Rasphone.exe -d "' & $strConnectionName & '"', @TempDir, @SW_HIDE)

*Edit: Altered code block to show AutoIT syntax highlight

Edited by Wruck

Share this post


Link to post
Share on other sites

You might be better served by making an executable that calls the Dial-Up Network by name. Not sure if this is what you were looking for, but I hope it helps some.



Global $strConnectionName = 'Dial-up Connection' ; The actual name of the DUN Connection
Run(@ComSpec & ' /c %Systemroot%\System32\Rasphone.exe -d "' & $strConnectionName & '"', @TempDir, @SW_HIDE)

*Edit: Altered code block to show AutoIT syntax highlight

Thanks in advance.But what  you posted in the post is not my wanted.  I wrote a Script to auto-create Dial-up Connection,I want to create a link file in the desktop like the manually-created link did.


董小姐,你微笑的时候很美,就像安河桥下,清澈的水...

Share this post


Link to post
Share on other sites

Perhaps something like this then?

Global $strConnectionName = 'Dial-up Connection' ; The actual name of the DUN Connection
FileCreateShortcut('%SystemRoot%\System32\Rasphone.exe', @DesktopDir & '\' & $strConnectionName & '.lnk', @TempDir, '-d "' & $strConnectionName & '"')

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0