This can be done by setting up your windows machine as a very simple wireless access point, similar to the ad-hoc functionality, more difficult to set up but far more robust, i.e. any device that supports WiFi will be able to connect. It is known as ‘hostednetwork’ and uses the built-in Microsoft Virtual WiFi Adapter.
To set it up, bring up the elevated command prompt by pressing
cmd and hitting
Ctrl-Shift-Enter. Then enter the following command:
netsh wlan set hostednetwork mode=allow "ssid=<ssid>" “key=<passphrase>” keyUsage=persistent
Most options are quite self-explanatory, but you can get more info using
netsh wlan help. After executing this command, the hostednetwork will be stored permanently, but still needs to be started and stopped manually. You might want to create some sort of shortcut for the following commands:
netsh wlan start hostednetwork netsh wlan stop hostednetwork
Note that these commands too must be run as admin.
At this point, a new item should have appeared in the ‘network connections’ section of the Windows network center. You can edit its properties, but the default settings should work just fine. Your phone should be able to detect the freshly made access point and connect to it, obtaining an IP-address in the 192.168.137.0/24 range. Don’t worry though, this will not affect the wired connection on your computer, as they’re both using different networks.
While a connection has been established, your pc will not allow machines on the wireless port to interface with any other ports and by extension, the internet. For this, you can use Internet Connection Sharing (ICS). Edit the properties of your wired interface, bring up the ‘Sharing’ tab, check the box to enable this feature and select the corresponding interface, the wireless AP that is. The interface is a bit buggy, you might need to revert, close the window and try again if you go wrong.
Voila, internet on your Android via your pc.
Try free Connectify. Easy to use and install software access point for Windows.