Ver código fonte

Changes to address roaming profile concerns.

Martijn Laan 7 anos atrás
pai
commit
8dd23519b8
3 arquivos alterados com 14 adições e 8 exclusões
  1. 7 1
      Examples/Example3.iss
  2. 6 5
      ISHelp/isetup.xml
  3. 1 2
      whatsnew.htm

+ 7 - 1
Examples/Example3.iss

@@ -32,4 +32,10 @@ Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
 ; uninstall, and delete the "My Company" key if there is nothing left in it.
 Root: HKA; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
 Root: HKA; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
-Root: HKA; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "Path"; ValueData: "{app}"
+Root: HKA; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "UserName"; ValueData: "{sysuserinfoname}"
+; HKA (and HKCU) should only be used for settings which are compatible with
+; roaming profiles so settings like paths should be written to HKLM, which
+; is only possible in administrative install mode.
+Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty; Check: IsAdminInstallMode
+Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey; Check: IsAdminInstallMode
+Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"; Check: IsAdminInstallMode

+ 6 - 5
ISHelp/isetup.xml

@@ -763,7 +763,7 @@ For example: If you used <tt>{src}\MYPROG.EXE</tt> on an entry and the user is i
 <li><i>SubkeyName, ValueName,</i> and <i>DefaultValue</i> may include constants. Note that you do <i>not</i> need to escape the closing brace of a constant as described above; that is only necessary when the closing brace is used elsewhere.</li>
 </ul>
 <example>
-<pre>{reg:HKA\Software\My Program,Path|{autopf}\My Program}</pre>
+<pre>{reg:HKLM\Software\My Program,Path|{autopf}\My Program}</pre>
 </example>
 </dd>
 
@@ -2340,9 +2340,9 @@ en.LanguageName=English
 
 <precode>
 [Registry]
-Root: HKA; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
-Root: HKA; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
-Root: HKA; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
+Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
+Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
+Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
 </precode>
 
 <p>The following is a list of the supported <link topic="params">parameters</link>:</p>
@@ -2366,11 +2366,12 @@ Root: HKA; Subkey: "Software\My Company\My Program\Settings"; ValueType: string;
 <tr><td><tt>HKA</tt></td><td>(equals HKLM in <link topic="admininstallmode">administrative install mode</link>, HKCU otherwise)</td></tr>
 </table>
 </indent>
+<p>Note: <tt>HKCU</tt> and <tt>HKA</tt> should only be used for settings which are compatible with roaming profiles.</p>
 <p>The values (including <tt>HKA</tt>) may have a suffix of <tt>32</tt> or <tt>64</tt>. Root key values with a suffix of <tt>32</tt> (for example, <tt>HKLM32</tt>) map to the 32-bit view of the registry; root key values with a suffix of <tt>64</tt> (for example, <tt>HKLM64</tt>) map to the 64-bit view of the registry.</p>
 <p>Root key values with a suffix of <tt>64</tt> can only be used when Setup is running on 64-bit Windows, otherwise an error will occur. On an installation supporting both 32- and 64-bit architectures, it is possible to avoid the error by adding a <tt>Check: IsWin64</tt> parameter, which will cause the entry to be silently skipped when running on 32-bit Windows.</p>
 <p>A root key value without a suffix (for example, <tt>HKLM</tt>) is equivalent to the value with a suffix of <tt>32</tt> (for example, <tt>HKLM32</tt>) unless the install is running in <link topic="32vs64bitinstalls">64-bit install mode</link>, in which case it is equivalent to the value with a suffix of <tt>64</tt> (for example, <tt>HKLM64</tt>).</p>
 <example>
-<pre>Root: HKA</pre>
+<pre>Root: HKLM</pre>
 </example>
 </param>
 

+ 1 - 2
whatsnew.htm

@@ -43,8 +43,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
   <li>Pascal Scripting change: Removed the <tt>GetShellFolder</tt> support function. As the help file already recommended, use <tt>ExpandConstant</tt> instead.</li>
 </ul>
 <ul>
-  <li>Added new [Registry] section <tt>Root</tt> value: <tt>HKA</tt>. Equals <tt>HKLM</tt> in administrative install mode, and <tt>HKCU</tt> otherwise. Also supported by <tt>{reg:...}</tt> constants. It is recommended to update your scripts to use <tt>HKA</tt> as much as possible to avoid mistakes. <tt>HKA32</tt> and <tt>HKA64</tt> are also supported.</tt></li>
-  <li>Updated all examples to use <tt>HKA</tt> instead of <tt>HKLM</tt> or <tt>HKCU</tt> as much as possible.</li>
+  <li>Added new [Registry] section <tt>Root</tt> value: <tt>HKA</tt>. Equals <tt>HKLM</tt> in administrative install mode, and <tt>HKCU</tt> otherwise. Also supported by <tt>{reg:...}</tt> constants. <tt>HKA</tt> (and <tt>HKCU</tt>) should only be used for settings which are compatible with roaming profiles. <tt>HKA32</tt> and <tt>HKA64</tt> are also supported.</tt></li>
   <li>Pascal Scripting change: Added <tt>HKA</tt> and <tt>HKEY_AUTO</tt> constants. <tt>HKA32</tt>, <tt>HKA64</tt>, <tt>HKEY_AUTO_32</tt>, and <tt>HKEY_AUTO_64</tt> are also supported.</li>
 </ul>
 <p>Other changes:</p>