All you need to do is run the following two commands in cmd -
Open cmd with Run as Administrator.
1) netsh wlan set hostednetwork mode=allow ssid=wifiname key=wifipassword
2) netsh wlan start hostednetwork
Important - For this to work, your sharing should be on in networkproperties for the network/ethernet connection that you want to share through your wifi:
Go to Open Network and Sharing Centre ->Change Adapter Settings(On left panel)
Your wifi hotspot would be ready. :)
To stop the wifi hotspot -
Write the following in command prompt : netsh wlan stop hostednetwork