문제

I have an vb.net windows application in this application i want run another exe file in silent mode,for this first i have run this exe file in command line it is working.But i don't know how to pass the these arguments through vb.coding process.start .

through command line i have pass like this. D:\myapps>sample.exe /s /v/qn (working fine)

but through coding i have pass like this

 Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))
        Dim info As New System.Diagnostics.ProcessStartInfo
        info.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\sample.exe"
        info.Arguments = "/s /v/qn"
        Dim process As New System.Diagnostics.Process
        process.StartInfo = info
        process.Start()
        MessageBox.Show(info.Arguments.ToString())
        process.Close()

this is not working what is wrong with this code please help me..

도움이 되었습니까?

해결책

Process.Start("D:\myapps\sample.exe", "/s /v/qn")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top