HINSTANCE ShellExecute( HWND hwnd, // handle to parent window LPCTSTR lpOperation, // pointer to string that specifies operation to perform LPCTSTR lpFile, // pointer to filename or folder name string LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters LPCTSTR lpDirectory, // pointer to string that specifies default directory INT nShowCmd // whether file is shown when opened );
UINT WinExec( LPCSTR lpCmdLine, // address of command line UINT uCmdShow // window style for new application );
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);
UINT uCmdShow // window style for new application
);
CreateProcess参数有点复杂.
ShellExecute(NULL,'open',文件路径,参数,执行目录,窗口状态)不错,就是它了.
ShellExecute(application.MainForm.Handle,nil,'http://www.zqsoft.com',nil,nil,SW_SHOWNORMAL)把'http://www.zqsoft.com'换成你要执行的文件就可以了
不行的话就加入shellapi