首页  编辑  

执行非Exe扩展名的程序

Tags: /C#/API调用/   Date Created:

using System . Runtime . InteropServices;

[ DllImport ( "kernel32.dll" )]

internal static extern uint WinExec( string lpCmdLine , uint uCmdShow);

private const uint SW_SHOW = 5 ;

private void button1_Click( object sender , EventArgs e)

{

   WinExec( @"c:\temp\temp.bin" , SW_SHOW);

}