exx1976
asked on
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.ex e"
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
Here's what I have so far:
dim myproc as new process
dim startinfo as new processstartinfo
startinfo.filename = "c:\winnt\system32\ping.ex
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
Try Shell("Ping 127.0.0.1 > c:\REs.txt")
ASKER
I ended up figuring it out.. I just did
startinfo.filename = "c:\winnt\system32\ping.ex e"
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?
startinfo.filename = "c:\winnt\system32\ping.ex
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?
ASKER
Oops.. That last line should have read
myproc.start(startinfo)
myproc.start(startinfo)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
I think well close this one and create a new question so people can learn from your question.
https://www.experts-exchange.com/Community_Support/
and just send this link and tell them to close it
and just send this link and tell them to close it
is it windows 2000?
Why did you accept the question?
ASKER
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: https://www.experts-exchange.com/questions/21185012/Bind-to-a-specific-server-using-LDAP-VB-NET-2003.html
Thanks!
The AD/LDAP question is here: https://www.experts-exchange.com/questions/21185012/Bind-to-a-specific-server-using-LDAP-VB-NET-2003.html
Thanks!