Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Hide DOS Window

Posted on 2008-10-06
3
Medium Priority
?
230 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 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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 …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

664 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