If this is not possible using 7za, I am also open to hearing about other approaches. Is there a way to run 7za.exe within an application completely silent, that is, without instantiating the shell command window flicker? GetExitCodeProcess(pj.hProcess, (LPDWORD)(&exit)) īoth of these methods result in the shell prompt window flicker. WaitForSingleObject( pj.hProcess, IGNORE ) //ingnore signal If(CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &sj, &pj) = 0) Where SystemX is defined: int SystemX(command) So far I have tried appending > nul, just as I illustrated in the command prompt image above, then using the system() command, as well as a modified system command which launches exe in another process: sprintf(command, "7za.exe x -y -o%s %s > nul", filepathUnComp, filepath) However, I need to call it in a loop (several hundred times), from a Windows application, resulting in a constant flicker as Windows launches a shell then kills it when the command is complete. Unable to run PowerShell uninstall script. How can i uninstall Google Chrome using Power Shell. From within the Windows command shell, I can append > nul to the end of a command line call of 7za, and it suppresses everything, as shown here: Using your second example looks like it starts a 'Windows Installer' process in Task Manager, but still returns to the command prompt more or less right away, and doesnt seem to uninstall Chrome. I would like to call 7za.exe (and possibly other console applications, that by default result in the shell command window) from within an application written in ANSI C without the shell prompt window popping up for each call. I have looked at these posts addressing similar issues: From Python and Extract Silently and Command Line Option
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |