Jump to content
Einstein197

CMD to autoit

Recommended Posts

Einstein197

In command prompt I use

 

netsh wlan set hostednetwork mode=allow ssid=NETWORKNAME key=PASSWORD

 

How do I do that in autoit  also I want to hide the network ie turn off broadcast


 

Share this post


Link to post
Share on other sites
JLogan3o13

@Einstein197 search function broken? A simple forum search of netsh shows several hundred threads on the subject.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Einstein197

Search here nothing I search for I can find y this

  • Confused 1

Share this post


Link to post
Share on other sites
JLogan3o13

Really? How odd...

1.png.517077dbd714f75a430e364b0cf45146.png

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Einstein197

How the hell I only found a few

Share this post


Link to post
Share on other sites
Einstein197

And not anything useful at least not wat I was looking for

Share this post


Link to post
Share on other sites
Subz

Didn't we answer this in the last post?  Just need to change the parameters.

 

Share this post


Link to post
Share on other sites
Einstein197

U mean instead of wlan start  just change the array to wlan set etc

But any way to turn off broadcast

Share this post


Link to post
Share on other sites
Subz

To disable broadcast I believe you change the mode to disallow for example:

RunWait(@ComSpec & " /c netsh wlan set hostednetwork mode=disallow ssid=NETWORKNAME key=PASSWORD", "", @SW_HIDE)

 

Share this post


Link to post
Share on other sites
Einstein197

I tot the mode was to allow making a hotspot

Share this post


Link to post
Share on other sites
JLogan3o13

Why do an AutoIt script to run CMD line code when you can just use Run or ShellExecute and do it in AutoIt directly?

ShellExecute("netsh.exe", "wlan set hostednetwork mode=allow ssid=mynetworkname key=password")

works just fine


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Subz

Not sure if I'm on the same page, are referring to hiding the routers ssid so it can't be seen?  Normally you can hide the ssid via your router settings.

Share this post


Link to post
Share on other sites
Einstein197

Well the thing is it's virtual

 

 

Screenshot_20180314-191359.png

Share this post


Link to post
Share on other sites
Einstein197
12 minutes ago, JLogan3o13 said:

Why do an AutoIt script to run CMD line code when you can just use Run or ShellExecute and do it in AutoIt directly?

ShellExecute("netsh.exe", "wlan set hostednetwork mode=allow ssid=mynetworkname key=password")

works just fine

I have a different command that works with CMD bt I want to do it with autoit and turn off the broadcast

Share this post


Link to post
Share on other sites
JLogan3o13

Ok, but that is the command you led the OP with. So what you're really saying is that you want to turn off broadcast with netsh and don't know how.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Einstein197

Yup right on I found this post c if u can fig it out

Screenshot_20180314-192457.png

Share this post


Link to post
Share on other sites
Einstein197

Bt is that wat I'm looking for

Share this post


Link to post
Share on other sites
Subz

The best way is to test

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • litlmike
      By litlmike
      I have two networks that I have to switch between often (really annoying).  Does anyone know how to connect to a WiFi network using Autoit?  I would like to avoid solutions with MouseClick().
      So something like:
      HotKeySet("_ToggleNetwork", "~") While 1 Sleep(1000) WEnd Func _ToggleNetwork() If Network A is connected Then Connect to Network B If Network B is connected Then Connect to Network A EndFun
×