How can i start an application from code?

  • Thread starter Thread starter dee
  • Start date Start date
D

dee

Hi
How can I start an application using .NET? I want to start notepad with
contents of a certain file.
Thanks
Dee
 
Shell("notepad c:\mytextfile.txt")
System.Diagnostics.Process.Start("notepad", "c:\mytextfile.txt")

For further options, take a look the Process and ProcessStartInfo classes
in the System.Diagnostics namespace.

hope that helps..
Imran.
 
Thanks short and sweet :)

Imran Koradia said:
Shell("notepad c:\mytextfile.txt")
System.Diagnostics.Process.Start("notepad", "c:\mytextfile.txt")

For further options, take a look the Process and ProcessStartInfo classes
in the System.Diagnostics namespace.
hope that helps..
Imran.
 
Back
Top