Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invoking a DOS Executable from C++

Status
Not open for further replies.

hgh

Programmer
May 18, 2002
1
0
0
US
I have the following directory structure in my PC and the executable is under that folder. I need to invoke this file from C++ but the space in the folder name gives me trouble.

Ex. c:\test app\notepad.exe

please note that there is a space in the folder name "test app"

I tried with 'system()' but could not succeed. Any hint would be appreciated.

Thanks
 
try this:
WinExec("c:\\test app\\notepad.exe", SW_SHOW); ---------------------
Silver
crach@jutukas.com
icq: 97505332
 
For win32 console try this (it's case sensitive)
ShellExecute (NULL,"open","c:\\test app\\notebad.exe",NULL,NULL,SW_SHOWNORMAL); ---------------------
Silver
crach@jutukas.com
icq: 97505332
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top