Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hide spawned process window?

Posted on 2004-10-27
10
Medium Priority
?
253 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:exx1976
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 12424900
Try Shell("Ping 127.0.0.1 > c:\REs.txt")
0
 
LVL 18

Author Comment

by:exx1976
ID: 12424959
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
 
LVL 18

Author Comment

by:exx1976
ID: 12424967
Oops..  That last line should have read

myproc.start(startinfo)

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 48

Accepted Solution

by:
Mikal613 earned 2000 total points
ID: 12425001
Go for it whats the question?
0
 
LVL 18

Author Comment

by:exx1976
ID: 12425048
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
 
LVL 48

Expert Comment

by:Mikal613
ID: 12425063
I think well close this one and create a new question so people can learn from your question.
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 12425071
http://www.experts-exchange.com/Community_Support/

and just send this link and tell them to close it
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 12425086
is it windows 2000?
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 12425090
Why did you accept the question?
0
 
LVL 18

Author Comment

by:exx1976
ID: 12425133
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question