diff --git a/trunk/ProcessHacker/Build/Installer/Process_Hacker_installer.iss b/trunk/ProcessHacker/Build/Installer/Process_Hacker_installer.iss index f2132fde3..3b953a4ee 100644 --- a/trunk/ProcessHacker/Build/Installer/Process_Hacker_installer.iss +++ b/trunk/ProcessHacker/Build/Installer/Process_Hacker_installer.iss @@ -294,12 +294,22 @@ var NetFrameWorkInstalled : Boolean; Result1 : Boolean; begin - NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0'); + // Create a mutex for the installer and if it's already running then expose a message and stop installation + if CheckForMutexes(installer_mutex_name) then begin + if not WizardSilent() then + MsgBox(ExpandConstant('{cm:msg_SetupIsRunningWarningInstall}'), mbError, MB_OK); + Result := False; + end + else begin + CreateMutex(installer_mutex_name); + end; + +NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0'); if NetFrameWorkInstalled then begin Result := True; end else begin - Result1 := MsgBox(ExpandConstant('{cm:msg_asknetdown}'), mbError, MB_YESNO or MB_DEFBUTTON1) = IDYES; + Result1 := MsgBox(ExpandConstant('{cm:msg_asknetdown}'), mbCriticalError, MB_YESNO or MB_DEFBUTTON1) = IDYES; if Result1 =False then begin Result:=False; end @@ -307,19 +317,6 @@ begin Result:=False; ShellExec('open', 'http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe', '','',SW_SHOWNORMAL,ewNoWait,ErrorCode); - end; -end; - -begin - // Create a mutex for the installer and if it's already running then expose a message and stop installation - Result := True; - if CheckForMutexes(installer_mutex_name) then begin - if not WizardSilent() then - MsgBox(ExpandConstant('{cm:msg_SetupIsRunningWarningInstall}'), mbError, MB_OK); - Result := False; - end - else begin - CreateMutex(installer_mutex_name); end; end; end;