Process  p  =  new  Process(); 
p.StartInfo.FileName  =  "文件名" 
p.SratrInfo.Arguments  =  "运行参数" 
p.Start(); 
--------------------------------------------------------------- 

或者使用ShellExecute这个API函数,
[DllImport("shell32.dll")] 
public  static  extern  int  ShellExecute( 
           IntPtr  hwnd,   
           StringBuilder  lpszOp, 
           StringBuilder  lpszFile, 
           StringBuilder  lpszParams, 
           StringBuilder  lpszDir, 
           int  FsShowCmd); 
 
调用: 
ShellExecute(IntPtr.Zero,   
           new  StringBuilder("Open"),   
           new  StringBuilder("notepad"), 
           new  StringBuilder(""), 
           new  StringBuilder(@"C:"),  1); 

 

相关文章:

  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-07-28
相关资源
相似解决方案