Browse Source

- register ditto for crash dumps
- close ditto in installer
- uncheck the view help option

Scott Brogden 9 years ago
parent
commit
addf885d7f
1 changed files with 52 additions and 1 deletions
  1. 52 1
      DittoSetup/DittoSetup_10.iss

+ 52 - 1
DittoSetup/DittoSetup_10.iss

@@ -27,6 +27,7 @@ DisableReadyPage=yes
 DirExistsWarning=no
 UninstallLogMode=overwrite
 ChangesAssociations=yes
+CloseApplications=yes
 
 [Languages]
 Name: English; MessagesFile: compiler:Default.isl
@@ -95,7 +96,7 @@ Name: {group}\Uninstall; Filename: {uninstallexe}
 
 [Run]
 Filename: {app}\Ditto.exe; Description: Launch Ditto; Flags: nowait postinstall skipifsilent
-Filename: {app}\Help\DittoGettingStarted.htm; Description: View Help; Flags: nowait postinstall skipifsilent shellexec
+Filename: {app}\Help\DittoGettingStarted.htm; Description: View Help; Flags: nowait postinstall skipifsilent shellexec unchecked
 Filename: {app}\Changes.txt; Description: View Change History; Flags: nowait postinstall skipifsilent shellexec unchecked
 
 [Registry]
@@ -134,4 +135,54 @@ end;
 
 
 
+procedure CurStepChanged(CurStep: TSetupStep);
+var
+  ProgressPage: TOutputProgressWizardPage;
+  ErrorCode : Integer;
+  AbortNeeded: Boolean;
+begin
+  AbortNeeded := false;
+  case CurStep of
+    ssInstall:
+    begin
+    end;
+
+	  ssPostInstall:
+  	begin            
+    end;
+	
+    ssDone:
+    begin
+      RegisterForCrashDump('Ditto')
+    end;
+
+  end;
+end;
+
+procedure RegisterForCrashDump(theApp : String);
+var
+   theExe : String;
+begin
+  theExe := theApp + '.exe';
+  if IsWin64() then
+    begin
+      if RegValueExists(HKLM64, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpFolder') = false then
+        RegWriteStringValue(HKLM64, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpFolder', ExpandConstant('{userappdata}') + '\Ditto\Dumps');
+      if RegValueExists(HKLM64, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpType') = false then
+        RegWriteDWordValue(HKLM64, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpType', 2);
+      if RegValueExists(HKLM64, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpCount') = false then
+        RegWriteDWordValue(HKLM64, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpCount', 3);
+    end
+  else
+    begin
+      if RegValueExists(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpFolder') = false then
+        RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpFolder', ExpandConstant('{userappdata}') + '\Ditto\Dumps');
+      if RegValueExists(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpType') = false then
+        RegWriteDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpType', 2);
+      if RegValueExists(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpCount') = false then
+        RegWriteDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\' + theExe, 'DumpCount', 3);
+    end;
+end;
+
+