Sharing your internet connection from a windows phone is just super easy. It’s all I need for a quick research or edit session on the road, enjoying the brilliant Touch Cover of my Surface, instead of typing on my tiny cell phone screen.

For longer sessions, e.g. if the hotel WLAN connection becomes flaky during evening hours, I’d rather not use precious traffic from my cell phone. Instead I want to use the way more generous plan I have for my built in mobile connection on my laptop.

As I have pointed out before, network options have changed with the switch to Windows 8. And that holds true to the setup of an ad-hoc WLAN connection as well. As far as I could tell the option to start a new ad-hoc wireless network was removed from the standard GUI.

Fortunately it is possible to create one from the command line. All we need is a little help from netsh.

Just add this to a start.bat:


REM start
netsh wlan set hostednetwork mode=allow ssid=TSharpAdHoc key=123RandomKey
netsh wlan start hostednetwork

and a stop.bat:


REM stop
netsh wlan stop hostednetwork

Now you can even go as far as adding those as tiles as a convenient way to start the ad-hoc connection and share your mobile network via ICS. Done!

Now there are two little icons sitting in my new start menu for easy connection sharing enabling and disabling. So, please excuse me, I will go sit over there on the bed, proof-reading this blog post, all thanks to SkyDrive and my new shared connection.