Back to 33.5/34
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2392 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
34e75bfd21
commit
4df5cb4fac
7 changed files with 45 additions and 41 deletions
|
@ -32,9 +32,8 @@ HANDLE g_hInstance;
|
|||
HANDLE NSISCALL myCreateProcess(char *cmd, char *dir)
|
||||
{
|
||||
DWORD d;
|
||||
PROCESS_INFORMATION ProcInfo={0,};
|
||||
STARTUPINFO StartUp={0,};
|
||||
StartUp.cb=sizeof(StartUp);
|
||||
static PROCESS_INFORMATION ProcInfo;
|
||||
STARTUPINFO StartUp = {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))
|
||||
|
@ -237,14 +236,14 @@ BOOL NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
|
|||
char *szRenameSec = "[Rename]\r\n";
|
||||
HANDLE hfile, hfilemap;
|
||||
DWORD dwFileSize, dwRenameLinePos;
|
||||
static const char nulint[4]="NUL";
|
||||
|
||||
*((int *)tmpbuf) = *((int *)"NUL");
|
||||
|
||||
if (pszNew) {
|
||||
// create the file if it's not already there to prevent GetShortPathName from failing
|
||||
CloseHandle(myOpenFile(pszNew, 0, CREATE_NEW));
|
||||
GetShortPathName(pszNew,tmpbuf,1024);
|
||||
}
|
||||
else *((int *)tmpbuf) = *((int *)nulint);
|
||||
// wininit is used as a temporary here
|
||||
GetShortPathName(pszExisting,wininit,1024);
|
||||
cchRenameLine = wsprintf(szRenameLine,"%s=%s\r\n",tmpbuf,wininit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue