I have a C++ program( using VC++6.0 with MFC) which calls another C++ .exe and performs some actions on it. The problem I am facing is that I get the file name of the .exe by using a GetDirectory function. Thus I am able to get the full file name such as "C:\projectname\software\debug\something.exe". Next I am trying to use the ShellExecute function to use this file name in the parameters such as ShellExecute(NULL,"open" ,"PatternName", NULL, NULL, SW_SHOWNORMAL); where PatternName is "C:....." . This doesn't give any errors but just that the .exe doesn't open! I realised that if I use double slash in the file name it works fine. But since I get the file in the above format(with single slash) I am unable to do that. Is there any workaround?As far as the filename is concerned I am only able to break it into drive,dir,filename(debug), ext using splitpath.
I cannot give the file name directly because diff user save the file in diff locations and we need to change the path in each of their pgms which is not viable option.
Any help is appreciated..
Thanks in advance