标签:完成后 user msdos return 两种 打开 版本升级 ace 方法
::ShellExecute(NULL, _T("open"), "d:\CodeSpace\FileRecv\mcisendstring.txt", NULL, NULL, SW_SHOWNORMAL);
::ShellExecute(NULL, L"open", L"explorer.exe", "/select,d:\CodeSpace\FileRecv\mcisendstring.txt", NULL, SW_SHOWNORMAL);
do{ DWORD lResult; PROCESS_INFORMATION piProcInfo; STARTUPINFO siStartInfo = {sizeof(STARTUPINFO)}; if(!CreateProcess(NULL, "uclient.exe /c", NULL, NULL, FALSE, NULL, NULL, NULL, &siStartInfo, &piProcInfo)) break; WaitForSingleObject(piProcInfo.hProcess, INFINITE); if(GetExitCodeProcess(piProcInfo.hProcess, &lResult) && lResult != -1 && lResult>0) { DebugInfoA("客户端有 %d 个文件可升级最新版", lResult); int nresult = MessageBox(NULL, "有新版本可以升级,是否立即升级?", "客户端版本升级", MB_OKCANCEL); if(IDOK == nresult) { CreateProcess(NULL, "uclient.exe /u", NULL, NULL, FALSE, NULL, NULL, NULL, &siStartInfo, &piProcInfo); return 0; } } }while(FALSE);
if(!CreateProcess(NULL, "7za.exe a \"d:\CodeSpace\Face.7z\" -o \"d:\CodeSpace\Face/*\"", NULL, NULL, FALSE, NULL, NULL, NULL, &siStartInfo, &piProcInfo)); if(!CreateProcess(NULL, "7za.exe x \"d:\CodeSpace\Face.7z\" -o \"d:\CodeSpace\Face\"", NULL, NULL, FALSE, NULL, NULL, NULL, &siStartInfo, &piProcInfo));
system(“copy \"C:\Users\s810.png\" \"d:\CodeSpace\719950C424FC405CA6139EDFB99F4E08.png\"”);
WinExec("cmd.exe /c copy \"C:\Users\s810.png\" \"d:\CodeSpace\s893CD.png\"", SW_HIDE);
ex1: WinExec("Notepad.exe c:\\autoexec.bat",SW_SHOW); 执行 notepad.exe 并正常显示器窗口 ex2: WinExec("Notepad.exe",SW_SHOWMINIMIZED); 执行 notepad.exe 但最小化其窗口 ex3: WinExec("Command.com /c dir c:\\",SW_SHOW); 执行 dir C:\ ,完成后关闭 MSDOS 窗口 ex4: WinExec("Command.com /k dir c:\\",SW_SHOW); 执行 dir C:\ ,完成后不关闭 MSDOS 窗口
标签:完成后 user msdos return 两种 打开 版本升级 ace 方法
原文地址:http://www.cnblogs.com/kellerfz/p/7804685.html