Hide spawned process window?

I'm pretty new to VB.NET, so bear with me, please..  I am trying to spawn a process that runs at a command line (Ping, for example), but I need to hide the window so it doesn't pop up and then go away..  This process gets called 4 times in succession, and flashes up and down, making the UI very ugly.

Here's what I have so far:


dim myproc as new process
dim startinfo as new processstartinfo

startinfo.filename = "c:\winnt\system32\ping.exe"
startinfo.arguments = "127.0.0.1"
myproc.start(startinfo)

This works just fine, and does what I want, I just want to be able to make the window not visible..


Anyone??

Thanks,
exx
LVL 18
exx1976Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mikal613Commented:
Try Shell("Ping 127.0.0.1 > c:\REs.txt")
0
exx1976Author Commented:
I ended up figuring it out..  I just did

startinfo.filename = "c:\winnt\system32\ping.exe"
startinfo.arguments = "127.0.0.1"
startinfo.windowstyle = processwindowstyle.hidden
myproc.start

But I do have a question about binding to AD..  Still want 500 points?
0
exx1976Author Commented:
Oops..  That last line should have read

myproc.start(startinfo)

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Mikal613Commented:
Go for it whats the question?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
exx1976Author Commented:
I am currently using LDAP to bind to active directory, however, the command process I am calling in the above code (TSCMD) requires a servername to bind to.  Every once in a while, the program will bind to the other DC, and then when I go to set the properties of the user with TSCMD, the account has not yet replicated to the specified server.  Is there a way to bind to a specific server in AD using LDAP so that I can always guarantee that the accounts will be created on the same server as TSCMD references?


0
Mikal613Commented:
I think well close this one and create a new question so people can learn from your question.
0
Mikal613Commented:
http://www.experts-exchange.com/Community_Support/

and just send this link and tell them to close it
0
Mikal613Commented:
is it windows 2000?
0
Mikal613Commented:
Why did you accept the question?
0
exx1976Author Commented:
It was easier to just give you the points.  Besides, I'm sure that the answer you provided would have worked just fine.

The AD/LDAP question is here:  http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21185012.html


Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.