If you have a Microsoft Virtual WiFi Miniport Adapter as one of the available network adapters, you may do the following:
- Run Windows Command Processor (cmd) as Administrator
- Type:
netsh wlan set hostednetwork mode=allow ssid=NAME key=PASSWORD
- Then:
netsh wlan start hostednetwork
- Open "Control Panel\Network and Internet\Network Connections"
- Right-click on your active network adapter (the one that you use to connect on the internet) and then click Properties
- Then open Sharing tab
- Check "Allow other network users to connect..." and select your WiFi Miniport Adapter
- Once finished, type:
netsh wlan stop hostednetwork
That's it!
Source: How to connect android phone to an ad-hoc network without softwares.