Przeglądaj źródła

Do not even try to write to HKLM, unless running in Administrator installation mode

Source commit: a61b3c72700dbb72ea9839f29cec2bc373a8b61a
Martin Prikryl 6 lat temu
rodzic
commit
f9327e612e
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      deployment/winscpsetup.iss

+ 4 - 4
deployment/winscpsetup.iss

@@ -302,13 +302,13 @@ Root: HKCU; SubKey: "{#RegistryKey}\Configuration\Interface"; ValueType: dword;
   ValueName: "Interface"; ValueData: 0; Check: UserSettings(1)
   ValueName: "Interface"; ValueData: 0; Check: UserSettings(1)
 Root: HKLM; SubKey: "{#RegistryKey}"; ValueType: dword; \
 Root: HKLM; SubKey: "{#RegistryKey}"; ValueType: dword; \
   ValueName: "DefaultInterfaceInterface"; ValueData: 0; \
   ValueName: "DefaultInterfaceInterface"; ValueData: 0; \
-  Check: UserSettings(1); Flags: noerror
+  Check: UserSettings(1) and IsAdminInstallMode; Flags: noerror
 ; Explorer-like interface
 ; Explorer-like interface
 Root: HKCU; SubKey: "{#RegistryKey}\Configuration\Interface"; ValueType: dword; \
 Root: HKCU; SubKey: "{#RegistryKey}\Configuration\Interface"; ValueType: dword; \
   ValueName: "Interface"; ValueData: 1; Check: not UserSettings(1)
   ValueName: "Interface"; ValueData: 1; Check: not UserSettings(1)
 Root: HKLM; SubKey: "{#RegistryKey}"; ValueType: dword; \
 Root: HKLM; SubKey: "{#RegistryKey}"; ValueType: dword; \
   ValueName: "DefaultInterfaceInterface"; ValueData: 1; \
   ValueName: "DefaultInterfaceInterface"; ValueData: 1; \
-  Check: not UserSettings(1); Flags: noerror
+  Check: (not UserSettings(1)) and IsAdminInstallMode; Flags: noerror
 ; If installer enabled ddext, let it reset the settings on uninstall,
 ; If installer enabled ddext, let it reset the settings on uninstall,
 ; so the default is used on the next run
 ; so the default is used on the next run
 Root: HKCU; SubKey: "{#RegistryKey}\Configuration\Interface"; ValueType: dword; \
 Root: HKCU; SubKey: "{#RegistryKey}\Configuration\Interface"; ValueType: dword; \
@@ -320,10 +320,10 @@ Root: HKCU; SubKey: "{#RegistryKey}\Configuration\Interface\Updates"; \
   Tasks: enableupdates; Check: not UpdatesEnabled
   Tasks: enableupdates; Check: not UpdatesEnabled
 Root: HKLM; SubKey: "{#RegistryKey}"; \
 Root: HKLM; SubKey: "{#RegistryKey}"; \
   ValueType: dword; ValueName: "DefaultUpdatesPeriod"; ValueData: 7; \
   ValueType: dword; ValueName: "DefaultUpdatesPeriod"; ValueData: 7; \
-  Tasks: enableupdates; Flags: noerror
+  Tasks: enableupdates; Flags: noerror; Check: IsAdminInstallMode
 Root: HKLM; SubKey: "{#RegistryKey}"; \
 Root: HKLM; SubKey: "{#RegistryKey}"; \
   ValueType: dword; ValueName: "DefaultCollectUsage"; ValueData: 1; \
   ValueType: dword; ValueName: "DefaultCollectUsage"; ValueData: 1; \
-  Tasks: enableupdates\enablecollectusage; Flags: noerror
+  Tasks: enableupdates\enablecollectusage; Flags: noerror; Check: IsAdminInstallMode
 
 
 #sub EmitLang
 #sub EmitLang