A little help with using .bat files to start and ad-hoc network.

Status
Not open for further replies.

darthmorf

Treederator
Staff member
Moderator
Well, I have recently discovered that on Windows 8, creating an ad-hoc network is no longer easily done via the control panel. Instead you have to execute a load of admin commands in the command prompt. So I have been trying to set up a bat file that I can run to create the network. But here comes the tricky part. I am trying to create one that stores the admin password of the computer, so can be run successfully on a non-administrator account, only needing the password to be entered once, when the file is first created. But I am having trouble getting it to work.

In case you need them, these are the commands needed to create, and then start the network:

netsh wlan set hostednetwork mode=allow ssid=SamsLAN key=poisson1
netsh wlan start hostednetwork


If you can help, I will forever be in your debt.
 
Nice. Do what you can please!
first create a file named what you want then put in this
Code:
Netsh Wlan Set hostednetwork mode=Allow ssid=(name of ehh net) Key=(a password if you want)
then save as a bat file, then create a file named activate.txt (later save to bat) then put this one here to activate
Code:
 Netsh Wlan Start hostedNetwork (to activate the created network)
if you want desactivate make another one
Code:
Netsh Wlan Stop hostedNetwork(to desactivate)
as bat too.

i think in the same folder remember to remove the () that is in the activate in desactivate and put what you want in the first one
 
OK. That is just how to create an ad hoc network, not how to store admin credentials. But thanks anyway!
 
Last edited:
Status
Not open for further replies.
Back
Top Bottom