Solved

Hide DOS Window

Posted on 2008-10-06
3
220 Views
Last Modified: 2012-05-05
I have the following script that runs fine, however when it runs it opens up a black DOS window.  Is there any way that I can hide this DOS window?
here is the script

 Process.Start("C:\Program Files\SyncToy 2.0\SyncToyCmd.exe", "-R")
0
Comment
Question by:H-SC
[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
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 22651012
Hi H-SC,

Try this way:
        Dim p As New ProcessStartInfo
        p.WindowStyle = ProcessWindowStyle.Hidden
        p.FileName = "C:\Program Files\SyncToy 2.0\SyncToyCmd.exe"
        p.Arguments = "-R"
        Process.Start(p)

Open in new window

0
 
LVL 1

Author Comment

by:H-SC
ID: 22651380
jpaulino,
never thought of doing it that way.  I was trying to handle it via a dos switch command.  Your suggestion is even better.  

perfect as always!!
many thanks
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 22651411
Glad I could help
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

Suggested Solutions

Title # Comments Views Activity
Crystal reports login after closing form 3 56
ModalPopup  question 22 56
Check only one toolstripmenu item 12 60
EMAIL RANGES BASED ON CURRENT TIME 12 38
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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