Executing an exe
-
Hi all, I have somewhat simple DOS command line, but I can't get it to work. Here is my code: // the line to be executed: // c:\a\wzzip c:\b\b.zip c:\b\*.* // my first try, it return "The specified file was not found." ShellExecute(NULL, "open", "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", NULL, NULL, SW_SHOWNORMAL); //my second try WinExec ("c:\\a\\wzzip c:\\b\\b.zip c:\\b\\*.*", SW_SHOW); //my third try _spawnl( _P_WAIT, "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", NULL, NULL, NULL); Can anyone please help me? Thanks a lot.
-
Hi all, I have somewhat simple DOS command line, but I can't get it to work. Here is my code: // the line to be executed: // c:\a\wzzip c:\b\b.zip c:\b\*.* // my first try, it return "The specified file was not found." ShellExecute(NULL, "open", "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", NULL, NULL, SW_SHOWNORMAL); //my second try WinExec ("c:\\a\\wzzip c:\\b\\b.zip c:\\b\\*.*", SW_SHOW); //my third try _spawnl( _P_WAIT, "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", "C:\\a\\wzzip C:\\b\\b.zip C:\\b\\*.*", NULL, NULL, NULL); Can anyone please help me? Thanks a lot.
-
Hi, Why not trying the 'system' command? I've done it already a few times to execute a Dos command like you would give it on the command line, and this works fine. Give it a try? Best regards, Geert
Thank you very much Geert :) It works wonderfully!