czyt 8 Posted December 10, 2013 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 董小姐,你微笑的时候很美,就像安河桥下,清澈的水... Share this post Link to post Share on other sites
Wruck 1 Posted December 10, 2013 (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 December 10, 2013 by Wruck Share this post Link to post Share on other sites
czyt 8 Posted December 10, 2013 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
Wruck 1 Posted December 10, 2013 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