Command for executing files.....
-
Hello All Is there any command in SDK / MFC on passing the file name can execute with appropriate application. For Example command ("a.wav") should open "a.wav" file in Real Player or what user has installed / configured to open the *.WAV files. I can use, WinExec but it needs the executable path to be passed. User can install any type of player and configure different type of file format to open in different players. One Clue is in the Command Prompt if we type the file name it automatically finds the application to be used and opens the file. If the file extension is not mapped with any applicaiton it automatically open the "Open With" dialog box. So I there is any command which executes the string passed as in command line it will do. Is There any command? Thanks for your time Ravi
-
Hello All Is there any command in SDK / MFC on passing the file name can execute with appropriate application. For Example command ("a.wav") should open "a.wav" file in Real Player or what user has installed / configured to open the *.WAV files. I can use, WinExec but it needs the executable path to be passed. User can install any type of player and configure different type of file format to open in different players. One Clue is in the Command Prompt if we type the file name it automatically finds the application to be used and opens the file. If the file extension is not mapped with any applicaiton it automatically open the "Open With" dialog box. So I there is any command which executes the string passed as in command line it will do. Is There any command? Thanks for your time Ravi
-
Hello All Is there any command in SDK / MFC on passing the file name can execute with appropriate application. For Example command ("a.wav") should open "a.wav" file in Real Player or what user has installed / configured to open the *.WAV files. I can use, WinExec but it needs the executable path to be passed. User can install any type of player and configure different type of file format to open in different players. One Clue is in the Command Prompt if we type the file name it automatically finds the application to be used and opens the file. If the file extension is not mapped with any applicaiton it automatically open the "Open With" dialog box. So I there is any command which executes the string passed as in command line it will do. Is There any command? Thanks for your time Ravi
-
Try it: ShellExecute(NULL,"open","a.wav",NULL,"C:\\MyFolder",SW_SHOWNORMAL); or ShellExecute(NULL,"open","C:\\MyFolder\\a.wav",NULL,NULL,SW_SHOWNORMAL);
It is working fine... Thank you all... -Ravi
-
It is working fine... Thank you all... -Ravi