Solved

Hide DOS Window

Posted on 2008-10-06
3
215 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
  • 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 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