|
@@ -464,36 +464,38 @@ end;</pre></example>
|
|
|
</subcategory>
|
|
|
<subcategory>
|
|
|
<function>
|
|
|
- <name>IsWin64</name>
|
|
|
- <prototype>function IsWin64: Boolean;</prototype>
|
|
|
+ <name>Is64BitInstallModeSupported</name>
|
|
|
+ <prototype>function Is64BitInstallModeSupported: Boolean;</prototype>
|
|
|
<description><p>Returns True if the system is running a 64-bit version of Windows that provides the API support Inno Setup requires to perform 64-bit installation tasks. If False is returned, you cannot utilize any of Inno Setup's 64-bit-only features.</p>
|
|
|
<p>Do not use this function to detect <link topic="32vs64bitinstalls">64-bit install mode</link>, use <link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link> instead.</p></description>
|
|
|
<remarks><p>This function will always return True on an x64 edition of Windows.</p>
|
|
|
<p>For this function to return True on an Itanium edition of Windows, the system must be running Windows Server 2003 SP1 or later. Older versions lack APIs that Inno Setup requires (e.g. RegDeleteKeyEx).</p></remarks>
|
|
|
<example><pre>begin
|
|
|
- // Check IsWin64 before using a 64-bit-only feature to
|
|
|
+ // Check Is64BitInstallModeSupported before using a 64-bit-only feature to
|
|
|
// avoid an exception when running on 32-bit Windows.
|
|
|
- if IsWin64 then
|
|
|
+ if Is64BitInstallModeSupported then
|
|
|
begin
|
|
|
MsgBox('64-bit program files reside in: ' +
|
|
|
ExpandConstant('{autopf64}'), mbInformation, MB_OK);
|
|
|
end;
|
|
|
end;</pre></example>
|
|
|
<seealso><p><link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link><br />
|
|
|
+<link topic="isxfunc_IsX64">IsX64</link><br />
|
|
|
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
|
|
|
</function>
|
|
|
<function>
|
|
|
<name>Is64BitInstallMode</name>
|
|
|
<prototype>function Is64BitInstallMode: Boolean;</prototype>
|
|
|
<description><p>Returns True if Setup or Uninstall is running in <link topic="32vs64bitinstalls">64-bit install mode</link>, or False if it is running in <link topic="32vs64bitinstalls">32-bit install mode</link>.</p></description>
|
|
|
- <remarks><p>When True is returned, it is safe to assume that <link topic="isxfunc_IsWin64">IsWin64</link> will also return True.</p></remarks>
|
|
|
+ <remarks><p>When True is returned, it is safe to assume that <link topic="isxfunc_Is64BitInstallModeSupported">Is64BitInstallModeSupported</link> will also return True.</p></remarks>
|
|
|
<example><pre>begin
|
|
|
if Is64BitInstallMode then
|
|
|
MsgBox('Installing in 64-bit mode', mbInformation, MB_OK)
|
|
|
else
|
|
|
MsgBox('Installing in 32-bit mode', mbInformation, MB_OK);
|
|
|
end;</pre></example>
|
|
|
- <seealso><p><link topic="isxfunc_IsWin64">IsWin64</link><br />
|
|
|
+ <seealso><p><link topic="isxfunc_Is64BitInstallModeSupported">Is64BitInstallModeSupported</link><br />
|
|
|
+<link topic="isxfunc_IsX64">IsX64</link><br />
|
|
|
<link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
|
|
|
</function>
|
|
|
<function>
|
|
@@ -504,18 +506,18 @@ end;</pre></example>
|
|
|
<p><tt>TSetupProcessorArchitecture = (paUnknown, paX86, paX64, paIA64, paARM64);</tt></p></description>
|
|
|
<remarks><p>A 64-bit processor architecture will never be returned on 32-bit versions of Windows. Hence, you cannot use this function to detect a 64-bit AMD CPU on a 32-bit version of Windows; you'll just get back <tt>paX86</tt> if you try.</p>
|
|
|
<p><tt>paUnknown</tt> is returned if Setup/Uninstall does not recognize the processor architecture. It can be assumed that an "unknown" architecture is at least capable of executing 32-bit code, or Setup/Uninstall wouldn't be running at all.</p>
|
|
|
-<p>If <tt>paIA64</tt> is returned, and <tt>ia64</tt> is <i>not</i> included in the value of the <link topic="setup_architecturesinstallin64bitmode">ArchitecturesInstallIn64BitMode</link> [Setup] section directive, you should not assume that Inno Setup's 64-bit-only features are available -- for example, the <tt>{autopf64}</tt> constant. Those features only work when <link topic="isxfunc_IsWin64">IsWin64</link> returns True, and as documented, it may not return True on older Itanium versions of Windows that lack certain APIs Inno Setup requires.</p>
|
|
|
+<p>If <tt>paIA64</tt> is returned, and <tt>ia64</tt> is <i>not</i> included in the value of the <link topic="setup_architecturesinstallin64bitmode">ArchitecturesInstallIn64BitMode</link> [Setup] section directive, you should not assume that Inno Setup's 64-bit-only features are available -- for example, the <tt>{autopf64}</tt> constant. Those features only work when <link topic="isxfunc_Is64BitInstallModeSupported">Is64BitInstallModeSupported</link> returns True, and as documented, it may not return True on older Itanium versions of Windows that lack certain APIs Inno Setup requires.</p>
|
|
|
<p>Therefore, instead of:</p>
|
|
|
<pre>
|
|
|
if ProcessorArchitecture = paIA64 then
|
|
|
// perform some Itanium-specific install task that
|
|
|
// involves expanding {autopf64}
|
|
|
</pre>
|
|
|
-<p>you should additionally check that IsWin64 returns True:</p>
|
|
|
+<p>you should additionally check that Is64BitInstallModeSupported returns True:</p>
|
|
|
<pre>
|
|
|
if ProcessorArchitecture = paIA64 then
|
|
|
begin
|
|
|
- if IsWin64 then
|
|
|
+ if Is64BitInstallModeSupported then
|
|
|
// perform some Itanium-specific install task that
|
|
|
// involves expanding {autopf64}
|
|
|
else
|
|
@@ -523,7 +525,7 @@ end;</pre></example>
|
|
|
// fail silently, try something else, etc.
|
|
|
end;
|
|
|
</pre>
|
|
|
-<p>If <tt>ia64</tt> <i>is</i> included in the value of the <link topic="setup_architecturesinstallin64bitmode">ArchitecturesInstallIn64BitMode</link> [Setup] section directive, then it is not necessary to check IsWin64 because Setup will do so itself at startup, and fail with an error message (<tt>MissingWOW64APIs</tt>) if it is False.</p></remarks>
|
|
|
+<p>If <tt>ia64</tt> <i>is</i> included in the value of the <link topic="setup_architecturesinstallin64bitmode">ArchitecturesInstallIn64BitMode</link> [Setup] section directive, then it is not necessary to check Is64BitInstallModeSupported because Setup will do so itself at startup, and fail with an error message (<tt>MissingWOW64APIs</tt>) if it is False.</p></remarks>
|
|
|
<example><pre>var
|
|
|
S: String;
|
|
|
begin
|
|
@@ -541,7 +543,7 @@ end;</pre></example>
|
|
|
<link topic="isxfunc_IsX64">IsX64</link><br />
|
|
|
<link topic="isxfunc_IsIA64">IsIA64</link><br />
|
|
|
<link topic="isxfunc_IsARM64">IsARM64</link><br />
|
|
|
-<link topic="isxfunc_IsWin64">IsWin64</link><br />
|
|
|
+<link topic="isxfunc_Is64BitInstallModeSupported">Is64BitInstallModeSupported</link><br />
|
|
|
<link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link></p></seealso>
|
|
|
</function>
|
|
|
<function>
|
|
@@ -1563,7 +1565,7 @@ end;</pre></example>
|
|
|
<name>EnableFsRedirection</name>
|
|
|
<prototype>function EnableFsRedirection(const Enable: Boolean): Boolean;</prototype>
|
|
|
<description><p>Controls whether built-in support functions that access files disable WOW64 file system redirection (with <link topic="64bitlimitations">some exceptions</link>). Specify True in the Enable parameter to leave redirection enabled when those functions are called; specify False to disable it. Returns the previous redirection state (True if redirection was enabled).</p>
|
|
|
-<p>If False is passed in the Enable parameter and the user isn't running a supported 64-bit version of Windows, an exception will be raised. To avoid the exception, call <link topic="isxfunc_IsWin64">IsWin64</link> first.</p></description>
|
|
|
+<p>If False is passed in the Enable parameter and the user isn't running a supported 64-bit version of Windows, an exception will be raised. To avoid the exception, call <link topic="isxfunc_Is64BitInstallModeSupported">Is64BitInstallModeSupported</link> first.</p></description>
|
|
|
<remarks><p>After you've performed the operation that required changing the redirection state, be sure to restore the previous state. Always use a <tt>try..finally</tt> language construct to ensure that the previous state is restored even if an exception occurs. See below for an example.</p>
|
|
|
<p>By default, file system redirection is enabled in <link topic="32vs64bitinstalls">32-bit install mode</link>, and disabled in 64-bit install mode.</p>
|
|
|
<p>This function has no effect on calls to functions in external DLLs. When invoking external functions, file system redirection is always left enabled.</p>
|
|
@@ -1576,7 +1578,7 @@ begin
|
|
|
// First verify that the user is running a supported 64-bit version
|
|
|
// of Windows, because calling EnableFsRedirection(False) will
|
|
|
// raise an exception otherwise.
|
|
|
- if IsWin64 then
|
|
|
+ if Is64BitInstallModeSupported then
|
|
|
begin
|
|
|
// Turn off redirection, so that cmd.exe from the 64-bit System
|
|
|
// directory is launched.
|