Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

Hide DOS Window

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
H-SC
Asked:
H-SC
  • 2
1 Solution
 
jpaulinoCommented:
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
 
H-SCAuthor Commented:
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
 
jpaulinoCommented:
Glad I could help
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now