Solved

Network Connection Script

Posted on 2015-01-30
10
129 Views
Last Modified: 2015-02-01
Hi, I would like to write a Wireless Network Connection Script so that by hitting a couple of keys, I could activate/dis-activate the wireless connection using the program AutoHotkeys.  Can someone help me with this? Thanks
0
Comment
Question by:camtz
  • 5
  • 5
10 Comments
 
LVL 52

Expert Comment

by:Joe Winograd, EE MVE
ID: 40581017
Here's a one-click/two-click technique that I use. Although I'm a big fan of AutoHotkey, it's not needed in this situation.

First, make a shortcut as follows:

Control Panel
Network and Sharing Center
Change adapter settings
Right-click on your wireless adapter and click Create Shortcut

It will say that Windows can't create a shortcut here and will ask if you want the shortcut on the desktop instead — click Yes.

That shortcut will act as an enable/disable toggle for your wireless connection. If the wireless is disabled, a single left-click on the shortcut will enable the wireless; if the wireless is enabled, a right-click will give you a context menu with a Disable option. In other words, one mouse click (a left) on the shortcut will enable wireless; two mouse clicks (a right and a left) on the shortcut will disable wireless.

You may place the shortcut wherever you want, such as the Start menu and/or the Desktop; and/or pin it to the taskbar. Regards, Joe
0
 

Author Comment

by:camtz
ID: 40581589
I followed your instructions to a t and unfortunately, it doesn't work for me.  I see the shortcut on the start menu and when I click on the trackpad on the left or the right, I see a little box on the screen saying that it is enabling it but I don't see one that says disabling.  However, I just noticed that I can go to Wireless Network Connection and it says Disabled but I'm still connected to the net.  So apparently it does not disable the connection.
0
 
LVL 52

Expert Comment

by:Joe Winograd, EE MVE
ID: 40581604
Hmmm, works perfectly here — it's a technique I've been using for many years on lots of laptops, with different versions of Windows and different wireless adapters.

To be clear, when I left-click on the shortcut, I see this:

Enabling
Then it goes from saying Enabling to Enabled.

Then a right-click on the shortcut shows this:

Disable
A left-click on Disable will disable it. Btw, a right-click on the shortcut when it is disabled shows this:

Enable
What are you seeing when you right-click on the shortcut, in both Enabled and Disabled states? Regards, Joe
0
 

Author Comment

by:camtz
ID: 40581780
I use a trackpad on an HP ENVY 15t.  Let me go back and re-do it and I'll show u what I get.
0
 
LVL 52

Expert Comment

by:Joe Winograd, EE MVE
ID: 40581784
I use the touchpad on two different HP EliteBook models (both with W7 Pro 64-bit) and they work fine. I'll be very surprised if your HP ENVY doesn't.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:camtz
ID: 40581819
Wow, I just lost everything I had typed so I am just going to show the pics and see if that gives u any clues.  I can get the Enabling but NOT the disabling even I go to status and click on disabling. As I said before, I do not use a mouse.  I do everything by clicking on the right trackpad.  My last question had to do with the fact that this is a new computer and it could have a bug and lastly, look at pic 6, could I be working with the wrong item?  I'm not trying to argue with you, I'm just trying to get the thing to work Thanks for your help.Pic-1.JPGPic-2.JPGPic-3.jpgPic-4.JPGPic-5.jpgPic-6.JPG
0
 
LVL 52

Accepted Solution

by:
Joe Winograd, EE MVE earned 500 total points
ID: 40581890
> I just lost everything I had typed

That's why I never type anything online. Too easy to lose stuff for a variety of reasons, such as an Internet glitch, an EE site problem, etc. I type everything into my text editor (doing Saves along the way) and then copy/paste into the EE site when I'm done. You have to lose a long post or an article only once to let that never happen again! I use my fav text editor, but just about any text-based tool will do the trick, such as Notepad, WordPad, Word, etc. Give it a try — I think you'll like it. And you'll definitely like not losing a long post ever again. :)

> I can get the Enabling

Yes, pic#2 looks as if Enabling is working. If you go into Control Panel>Network and Sharing Center after that, does it show the wireless adapter as Enabled? It should.

> I do not use a mouse. I do everything by clicking on the right trackpad.

Doesn't matter. A mouse right-click is the same as a touchpad/trackpad right-click (assuming, of course, that the touchpad/trackpad is set up properly in Control Panel>Mouse).

> My last question had to do with the fact that this is a new computer and it could have a bug

Sure, that's possible.

> look at pic 6, could I be working with the wrong item?

Yes, that is the wrong item! The Realtek PCIe GBE is the wired (not wireless) gigabit Ethernet adapter. The Qualcomm Atheros QCA9565 is your wireless adapter.
0
 

Author Comment

by:camtz
ID: 40582444
Dear Joe
Finally got it to work.  See pic.  Thanks for hanging in there with me until we got it solved.Capture.JPG
0
 

Author Comment

by:camtz
ID: 40582448
Thanks again
0
 
LVL 52

Expert Comment

by:Joe Winograd, EE MVE
ID: 40582542
You're welcome. That's great news! I'm very glad to hear that it isn't a hardware problem with your new laptop. Btw, I noticed Classic Shell in your screenshots — happy to see that you're making good use of it. You have it configured very similarly to mine, with the Classic Start menu and Classic Start button, although I moved the taskbar to the left in order to free up vertical screen space. Regards, Joe
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
A list of useful business intelligence software.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now