Running Dos shell in background

Joined
Jul 28, 2006
Messages
1
Reaction score
0
Changing IP under normal user account.

Option explicit
dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "runas /user:administrator ""cmd.exe"""
WScript.Sleep 100
oShell.Sendkeys "MyPassWord" & "{ENTER}"
WScript.Sleep 300
oShell.Sendkeys "netsh -f c:\home.txt" & "{ENTER}"
Wscript.Quit

This is the script that I want convert into C++. The main reason that I wanna convert is security. But I'm having problem that I don't the way to run dos without the window pop-up.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top