Exec will now always work
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1821 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3eaa8894f7
commit
2d7e541bf6
2 changed files with 5 additions and 2 deletions
|
@ -27,12 +27,15 @@ HANDLE g_hInstance;
|
|||
|
||||
HANDLE NSISCALL myCreateProcess(char *cmd, char *dir)
|
||||
{
|
||||
DWORD d;
|
||||
PROCESS_INFORMATION ProcInfo={0,};
|
||||
STARTUPINFO StartUp={0,};
|
||||
StartUp.cb=sizeof(StartUp);
|
||||
d=GetFileAttributes(dir);
|
||||
if (d == INVALID_FILE_ATTRIBUTES || !(d&FILE_ATTRIBUTE_DIRECTORY)) dir=0;
|
||||
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, dir, &StartUp, &ProcInfo))
|
||||
return NULL;
|
||||
if (NULL != ProcInfo.hThread) CloseHandle( ProcInfo.hThread );
|
||||
if (NULL != ProcInfo.hThread) CloseHandle( ProcInfo.hThread );
|
||||
return ProcInfo.hProcess;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue