eqvivalent for VB "Shell Function"

i'm VB.
i'm looking for MFC\VC++ eqvivalent for VB Shell Function.
this function activates any application from the current code.
examples :
Shell "path To App EXE",windowMode(Constants available)

or :

Shell "pathToDocFile_pathToWinword",WindowMode


knowing no eqvivalent in MFC\VC++, i've tried to include the
Proccess.H lib, and used :

that's works fine only when the path is in the same dir :


this one is not executing (the path is correct) :

system("I:\Program Files\Project1\Project1.exe");

this line raise 3 warnings :
warning C4129: 'P' : unrecognized character escape sequence

i suspect it's the Slash or space in folder name or long folder name.

another thing i've tried is a batch file. that's fine exept that it don't get a folder name like "Program Files"

anyway, i need an MFC\VC++ solution as simple as VB....

thank you.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Use the Win32 functions - ShellExecute or ShellExecuteEx.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
By the way, the warning error is due to the escape character '\'. It should read

system("I:\\Program Files\\Project1\\Project1.exe");

::ShellExecute(hWnd, NULL, _T("c:\\dirname\\abc.exe"), NULL, NULL, SW_SHOWNORMAL);
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Sub_MainAuthor Commented:
does compiling it with MFC lib linked  - will make the EXE run on any machine without instllation ?

i mean, in VB - if you just create an empty project - you have to install all VB runtime DLLs on the target machine.
i want to use MFC in order to distribute only the EXE by copying it.
will it work under any 95\98\NT clean fresh machine ?
ShellExecute is a Win32 API function, meaning that it is available on any Windows 95, 98 and NT. Actually, even Windows 3.1 supports it.
Sub_MainAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.