1

I'm just a lurker and wondering if I can create a vbscript that can run command prompt together with the other command that I want to type in command prompt.

Here's what I want to do:

I want to create a wifi hotspot using command prompt with this command;

`netsh wlan set hostednetwork mode=allow ssid=NAME key=PASSWORD 

netsh wlan start hostednetwork'

and another thing, can anyone helped me how can i share my network using command prompt to make my laptop wifi hotspot?

1 Answer 1

1

You want the "Shell" object to run commands:

strText="netsh wlan set hostednetwork mode=allow ssid=NAME key=PASSWORD"
Set shll = Wscript.CreateObject("Wscript.Shell")
Return = shll.Run(strText, 1, TRUE)

you can add as many "shll.run" commands as you need to - the TRUE flag above will make VBScript wait for the command to finish before continuing the script.

You would be better off looking at Powershell for sharing network connections.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.