1

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..

Community
  • 1
  • 1
Victor Athoti.
  • 829
  • 9
  • 22
  • 49

1 Answers1

6
Process.Start("D:\myapps\sample.exe", "/s /v/qn")
SSS
  • 4,807
  • 1
  • 23
  • 44
  • Thank you sss.. actually i have try this one at very first but it unable to run that .But when i run second time it is working fine.. – Victor Athoti. Sep 24 '12 at 07:54