InstallShield 2019 » InstallScript Language Reference
The WINSYSDIR64 system variable contains the name of the 64-bit System32 folder. This folder is used to store application extensions (DLLs), device drivers, and other Windows system files, depending on the version of Windows.
Although the WINSYSDIR64 variable is set to the 64-bit System32 folder, 64-bit Windows includes functionality to automatically redirect 32-bit applications (such as the InstallScript engine) to the 32-bit SysWOW64 folder. Therefore, if you are using InstallScript code to read or write to WINSYSDIR64, you may need to first disable file system redirection using the constant WOW64FSREDIRECTION with the functions Disable and Enable. Otherwise, reading from and writing to WINSYSDIR64 are incorrectly redirected to the 32-bit SysWOW64 folder. Since some Windows functionality that could be used by the installation requires that redirection be enabled to work, Windows documentation recommends that you disable redirection only for as long as necessary. It is recommended that you then enable file system redirection as soon as you have completed reading from or writing to WINSYSDIR64.
The example code below shows how to disable and enable redirection before and after transferring a file to the WINSYSDIR64 through script:
XCopyFile (SUPPORTDIR ^ "MyFile.dll", WINSYSDIR64, COMP_NORMAL);
Project • InstallScript projects have support for installing files to the 64-bit System32 folder without requiring any script modifications with WOW64FSREDIRECTION. If you have files that need to be installed to this location, you can add the files and registry data to a component, and select Yes for that component’s 64-Bit Component setting. At run time, the installation automatically disables file system redirection for the System32 files. To learn more, see Targeting 64-Bit Operating Systems with InstallScript Installations.
During setup initialization in InstallScript installations on 64-bit systems, the value of the WINSYSDIR64 variable is obtained by calling the Windows API GetSystemFolder from a 64-bit executable file.
In Basic MSI and InstallScript MSI installations on 64-bit systems, the value of the WINSYSDIR64 variable is initialized based on the Windows Installer property System64Folder. Note that deferred, commit, and rollback custom actions do not have access to this property. Therefore, the corresponding WINSYSDIR variable is empty in deferred, commit, and rollback custom actions. To learn more, see Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions.
InstallShield 2019 Help Library
|Copyright Information | Flexera|
Open topic with navigation