Calling nsExec from an installer that was executing using CreateProcess from another process now doesn't give an error about an invalid handle
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2002 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
abf2302e62
commit
ef97e938f5
2 changed files with 3 additions and 0 deletions
|
@ -109,6 +109,8 @@ void ExecScript(int log) {
|
|||
szUnusedBuf = (char *)GlobalLock(hUnusedBuf);
|
||||
}
|
||||
|
||||
#define TEST(x) if (!x) MessageBox(g_hwndParent, #x, "failed", MB_OK|MB_ICONERROR);
|
||||
|
||||
GetVersionEx(&osv);
|
||||
if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) {
|
||||
InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
|
||||
|
@ -125,6 +127,7 @@ void ExecScript(int log) {
|
|||
GetStartupInfo(&si);
|
||||
si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_HIDE;
|
||||
si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
si.hStdOutput = newstdout;
|
||||
si.hStdError = newstdout;
|
||||
if (!CreateProcess(NULL,g_exec,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi)) {
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue