#include <stdio.h>
#include <stdlib.h>
int _tmain(int argc, TCHAR* argv[]) {
TCHAR pszBuffer[256] = {0};
strcpy(pszBuffer, _T("setsdwperm.bat"));
strcat(pszBuffer, argv[1]);
ShellExecute(NULL, _T("open"), pszBuffer, NULL, NULL, SW_SHOWNORMAL);
}
an even more easy way is this:
#include <stdio.h>
#include <stdlib.h>
int _tmain(int argc, TCHAR* argv[]) {
ShellExecute(NULL, _T("open"), _T("setsdwperm.bat"), argv[1], NULL, SW_SHOWNORMAL);
}
-- modified at 13:22 Monday 19th November, 2007
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]