Search code examples
windowswinapiinno-setupshortcutnetwork-connection

Get network connection UID to create a shortlink


I'm using Inno Setup to create an installer for a VPN connection. I need to create a desktop shortcut to a network connection (VPN). When I create manually the shortcut, they point on an UID. How can I get this UID? Or, is there any other solution to do that?

screenshot


Solution

  • Finally, I found an alternative solution to create a shortcut to a network connection without UID :

    • Create a new shortcut
    • set location to : C:\Windows\System32\rasphone.exe -d "Connexion VPN"

    "Connexion VPN" is simply the name of the connection.