Jump to content

How can i create a shortcut of Local Area Connection to desktop in win 7?


 Share

Recommended Posts

 

use Run() to run:

netsh interface set interface "Local Area Connection" DISABLED

or

netsh interface set interface "Local Area Connection" ENABLED

so

Run('netsh interface set interface "Local Area Connection" DISABLED')

i am asking about creating a shortcut of a network adapter not Disable or enable it.

Edited by adnanbaloch

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Link to comment
Share on other sites

Can you open ncpa.cpl, create a shortcut from the icon in there and package that with file install into your executable (just dump it on their desktop?).  I don't know if they're unique to each install or not.  I've only got one pc here and can't try it out.

If it works you can shorten all that to:

FileInstall("Shortcut.lnk",@DesktopDir)
Edited by gruntydatsun
Link to comment
Share on other sites

This is shorter....

Run("control ncpa.cpl")
WinWaitActive("Network Connections")
Send("^a") ; or control click on the connection you need shortcut to
Send("!f")
Send("s")
WinWaitActive("Shortcut")
Send("!y")
Send("!+{F4}")
Link to comment
Share on other sites

 

This is shorter....

Run("control ncpa.cpl")
WinWaitActive("Network Connections")
Send("^a") ; or control click on the connection you need shortcut to
Send("!f")
Send("s")
WinWaitActive("Shortcut")
Send("!y")
Send("!+{F4}")

yeah shorter but not enough batter. i want to create a shortcut of a specific adapter not all and one another reason controlsend is better then send.thanks and think about another idea.

Edited by adnanbaloch

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...