Old 30th October 2007, 08:33   #1
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
How to Create Such a Shortcut

I'm Chinese,many nouns in computer,I don't know how to express in English,so I give a picture.

How to Create Such a Shortcut:
jiake is offline   Reply With Quote
Old 30th October 2007, 08:39   #2
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
Like this:
Attached Images
File Type: jpg networkshortcut.jpg (57.4 KB, 354 views)
jiake is offline   Reply With Quote
Old 30th October 2007, 10:19   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Try the ShellLink plug-in.

Stu
Afrow UK is offline   Reply With Quote
Old 30th October 2007, 11:50   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
It might even be possible to just copy the .lnk file

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th October 2007, 12:14   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I have noticed the shortcut will have a GUID as a path. You can try that GUID as the path when creating the shortcut with CreateShortCut, or try copying the .lnk file as Anders suggests.

Stu
Afrow UK is offline   Reply With Quote
Old 30th October 2007, 12:52   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
I suspect you would need to build a full guid path, and not just the guid for the connection, something like, ::{mycomputerguid}\::{controlpanel}\::{netconnections}\::{connectionguid} or something horrible like that, and the guid for the actual connection might change from machine to machine (that means a copy of a .lnk from another system might not work)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 31st October 2007, 06:26   #7
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
CreateShortCut $DeskTop\PPTP-VPN.lnk "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{网络连接}\::{BA126AD7-2166-11D1-B1D0-00805FC1270E}"

CreateShortCut $DeskTop\PPTP-VPN.lnk "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{NetConnections}\::{BA126AD7-2166-11D1-B1D0-00805FC1270E}"

This will create an incorrect shortcut.

Contact me: 137729898@qq.com
jiake is offline   Reply With Quote
Old 31st October 2007, 06:36   #8
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
Open the Shortcut of a NetConnection with NotePad,it content this path:

%AppData%\Microsoft\Network\Connections\Pbk\rasphone.pbk

%AllUsersProfile%\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk

Run %AppData%\Microsoft\Network\Connections\Pbk\rasphone.pbk,it shows this:
Attached Images
File Type: jpg 3.jpg (36.5 KB, 677 views)
jiake is offline   Reply With Quote
Old 31st October 2007, 06:39   #9
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
When click the first botton “Connect”,it show the same as double click the short on desktop.

Contact me: 137729898@qq.com
jiake is offline   Reply With Quote
Old 31st October 2007, 07:23   #10
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
I solve the problem:

CreateShortCut “ADSL.lnk” "%Windir%\system32\rasphone.exe -d ADSL"

Contact me: 137729898@qq.com
jiake is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump