derek7467
asked on
Createnowindow on program launch help!
I created the below program to open a process on a remote computer. I need to launch it as administrator so I right click and run as admin. On the local machine where im running the program from, I don't want to see the cmd prompt open, I tried the createnowindow=true, but its still showing a cmd window when I run my program. How do I hide the cmd window?
Dim targetpc As String = "192.168.1.3"
Dim program As String = "C:\Program Files (x86)\AVS4YOU\AVSAudioConverter\AVSAudioConverter.exe"
Try
Dim p As New Process()
p.StartInfo.FileName = "C:\Users\king derek\Desktop\PSTools\psexec.exe"
p.StartInfo.Arguments = "\\" & targetpc & " " & Chr(34) & "C:\Program Files (x86)\AVS4YOU\AVSAudioConverter\AVSAudioConverter.exe" & Chr(34)
p.Start()
p.StartInfo.CreateNoWindow = True
p.WaitForExit()
Catch ex As Exception
MsgBox("Shit didnt work")
End Try
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER