Link to home
Start Free TrialLog in
Avatar of derek7467
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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of James Williams
James Williams
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of derek7467
derek7467

ASKER

No I didn't find that, I think I was limiting my search to psexec!!!  Thank you, it worked!