czyt Posted December 10, 2013 Share 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 董小姐,你微笑的时候很美,就像安河桥下,清澈的水... Link to comment Share on other sites More sharing options...
Wruck Posted December 10, 2013 Share 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 Link to comment Share on other sites More sharing options...
czyt Posted December 10, 2013 Author Share 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. 董小姐,你微笑的时候很美,就像安河桥下,清澈的水... Link to comment Share on other sites More sharing options...
Wruck Posted December 10, 2013 Share 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 & '"') Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now