How can I execute an external exe from Visual C++?

Status
Not open for further replies.

DaSilva

Newbie level 4
Joined
Jan 28, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
42
C++ Problem

How can i execute an external exe from visual c++, for example notepad.exe??
 

Re: C++ Problem

SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "Notepad.exe"
ShExecInfo.lpParameters = "c:\\text.txt";
ShExecInfo.lpDirectory = NULL;

ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
 

C++ Problem

Hi,
refer to this topic
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…