Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

Start 'invisible' process

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tcomer - 02 Jan 2008 02:13 GMT
Is there any Process options that will allow a DOS application to
execute without showing the cmd window? My application uses a small
DOS application to retrieve a list of machines, but I don't want the
window to pop up while this is happening, I want it to be an
"invisible" process. Is there any way to do this?

I've googled, and have come up with many options, to no avail. I've
tried creating a batch file with the appropriate switches, but doesn't
seem to turn out the way it should. Any ideas? Thanks
Cor Ligthert[MVP] - 02 Jan 2008 06:02 GMT
tcomer,

I am not sure anymore, I thought it was this one, if not try another one it
is for sure there.

TheProcessStartObject.UseShellExecute = false;

Cor
Ignacio Machin ( .NET/ C# MVP ) - 02 Jan 2008 14:06 GMT
Hi,

Take a look at either Process or ProcessStartInfo classes, one of them
provide a property for it.

Ok, I did the search :) It.s ProcessStartInfo.WindowStyle the oe that does
the trick

Signature

Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.

> Is there any Process options that will allow a DOS application to
> execute without showing the cmd window? My application uses a small
[quoted text clipped - 5 lines]
> tried creating a batch file with the appropriate switches, but doesn't
> seem to turn out the way it should. Any ideas? Thanks
tcomer - 08 Jan 2008 01:30 GMT
Sorry for the late response, box crashed. I will try both of your
suggestion and post and update, thanks a lot for the help!; always
appreciated
tcomer - 10 Jan 2008 01:14 GMT
Thanks for all of the help! The following code executes a command-line
based application in 'invisible' mode. The DOS window isn't shown upon
execution. Again, the help is very much appreciated. Sorry for the
redundant question.

Process proc = new Process();

// Run in 'invisible' mode
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.FileName = path + "\\" + FILENAME;
proc.StartInfo.Arguments = CMD_PARAMS; // commandline params
proc.Start();

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.