Changeset 9
- Timestamp:
- 03/06/06 23:07:03 (6 years ago)
- Files:
-
- trunk/System.Installer/System.Installer.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/System.Installer/System.Installer.cpp
r4 r9 265 265 //field 1 = 2,field 2 will contain the number of ticks the bar has moved 266 266 // movement direction determined by g_bForwardProgress set by reset progress msg 267 handler->Invoke((g_iProgress + (g_bForwardProgress ? iField[1] : -1*iField[1])) /g_iProgressTotal);267 handler->Invoke((g_iProgress + (g_bForwardProgress ? iField[1] : -1*iField[1]))); 268 268 //SendMessage(/*handle to your progress control*/,PBM_DELTAPOS,g_bForwardProgress ? iField[1] : -1*iField[1],0); 269 269 break; … … 356 356 } 357 357 358 /* There is no MsiUninstallProduct(). According to the documentation,359 * MsiConfigureProduct(code, 0, INSTALLSTATE_ABSENT) should be equivalent.360 * However, I had some issues with it. Therefore, I'll just run msiexec.exe361 * and tell it to remove. It knows what to do.362 */363 358 setInternalUI(None); 364 359 UINT ret = MsiConfigureProduct(code, 0, INSTALLSTATE_ABSENT); 365 /*STARTUPINFO strt;366 // ZeroMemory is a macro that calls memset(), which isn't in the managed libs367 // SecureZeroMemory calls a Win32 API to do its work368 SecureZeroMemory(&strt,sizeof(STARTUPINFO));369 strt.cb = sizeof(STARTUPINFO);370 strt.dwFlags = 0;371 PROCESS_INFORMATION proc;372 UINT ret = 0;373 374 // DANGER WILL ROBINSON!!! DANGER!!!375 // HARDCODED PATH!!! OH, THE HUMANITY!!!376 if(CreateProcess(L"C:\\WINDOWS\\SYSTEM32\\msiexec.exe",code,NULL,NULL,FALSE,0,NULL,NULL,&strt,&proc))377 {378 WaitForSingleObject(proc.hProcess,INFINITE);379 DWORD code;380 GetExitCodeProcess(proc.hProcess,&code);381 ret = code;382 CloseHandle(proc.hProcess);383 CloseHandle(proc.hThread);384 }385 else386 ret = GetLastError();*/387 Marshal::FreeHGlobal(code);388 360 389 361 return ret;
