If I have this code
' Send file to Unix server via pscp
Dim Proc As New System.Diagnostics.Process
Proc.StartInfo = New ProcessStartInfo("C:\Windows\System32\cmd.exe")
Proc.StartInfo.Arguments = "/C C:\pscp.exe -pw " & PASSWORD & " " & physicalFolder & "\" & UNIXSCRIPTNAME & " " & unixLogin
Proc.StartInfo.RedirectStandardInput = True
Proc.StartInfo.RedirectStandardOutput = False
Proc.StartInfo.UseShellExecute = False
Proc.Start()
' Allows script to execute sequentially instead of simultaneously
Proc.WaitForExit()
What can I do to make the command window NOT appear when this is executed? Thanks!
You can do it by setting CreateNoWindow to true, This may help MSDN
Proc.StartInfo.CreateNoWindow = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With