Monday, April 04, 2011

Configure WiFi usb adapter as a WiFi hotspot (Windows 7)

Had allocated this long weekend for fixing Issue 46 in MeTA Studio, but ended with lot other bugs that had to be fixed. Eventually, I am only half way through fixing the real issue. With all this I got painfully bored :( So decided to do some changes in my setup.

I have a mobile data plan currently on my mobile for which pay about 100 INR per-month for 2GB, which are hardly used up. In fact, I find that I really do not require that. Also, after seeing the new 3G data plan rates (, I though it was high time I just dump the subscription. So now my phone is quite simply put, un-plugged, with only voice and sms, and pay as you use data.

Now when I am at home, on most of the weekdays, my parents watch TV. And my main desktop as well as the TV is same unit. So, if I need to work (with internet connection), I simply used to setup an ad-hoc connection using a WiFi usb adapter connected to my desktop. The sad part was that my Android 2.1 phone never saw this ad-hoc network. I could simply purchase a Wifi router, but just can't convince myself to get a new device.

After a bit of googling, I came across this very useful article:

Essentially, the whole thing boils down to two commands:

netsh wlan set hostednetwork mode=allow ssid=mywifi key=mypassword
netsh wlan start hostednetwork

and also enabling Internet connection sharing in Windows 7.

Next up, I wanted this to startup automatically when my main desktop booted. I did this by writing the above commands in a batch file and using NSSM - the Non-Sucking Service Manager ( to create a Windows auto start service.

Cool afternoon, now back to fixing Issue #46 ;)


FCSchaaf said...

about that last part (where you start this batch file automatically)...

Couldn't you just put it in the startup folder?

Ganesh said...

@FCSchaaf : That won't work as the commands needs to run with admin rights... unless you have completely disabled Windows 7 UAC, which is not a good idea.

slashragnarok said...

Is it possible to share internet connection from a PC which is getting its internet from another PC (Shared)?

Ganesh V said...

@slashragnarok this depends on if you have another free wifi card on your system, it should be possible to do this. Although I am not clear why would you like to re-share the internet connection?

jaspreet singh said...

I going to try this, hope this work

enlace wifi

Sarwar Khan said...

Guest & Wifi Hotspoti VizzWifi allows you to do just that, to make more money by offering Wifi to your guests, and at the same time giving your clients a better service.