安装到{sys}的文件/DLL没有出现在C:\ Windows \ system32中 [英] File/DLL installed to {sys} does not appear in C:\Windows\system32
问题描述
我不知道为什么,但是当我尝试将文件从安装目录复制到system32
时,尽管在Inno Setup中读取为成功安装,但它却无法这样做.这是我的代码:
I don't know why, but when I try to copy a file from my install directory to system32
, it fails to do so although it reads as successfully installing in Inno Setup. Here is my code:
[Files]
; specifies what files will be included in the installation
Source: "{src}\..\elt.properties"; DestDir: "C:\elt"; Flags: ignoreversion; BeforeInstall: SetProgressMax(10);
Source: "{src}\..\msvcr120.dll"; DestDir: {sys}; Flags: onlyifdoesntexist;
我也想包含我的日志输出,因为我觉得很奇怪该文件的时间如此之短,我正在2016年7月8日上午11点左右写这篇文章
I also wanted to include my log output as I thought it was strange that the time was so off for the file, I am writing this around 11 am on July 8 2016
[11:49:36.526] -- File entry --
[11:49:36.528] Dest filename: C:\Windows\system32\msvcr120.dll
[11:49:36.529] Time stamp of our file: 2013-10-04 23:58:24.000
[11:49:36.530] Installing the file.
[11:49:36.566] Successfully installed the file.
推荐答案
默认情况下,{sys}
(system32
)如果您的DLL是32位的,则实际上需要重定向.对于Windows 64位上的Windows 32位仿真,SysWOW64
是System32
等效项.另请参见以32位模式将Inno Setup安装到SysWOW64 .
If your DLL is 32-bit, you actually want the redirection. The SysWOW64
is the System32
equivalent for Windows 32-bit emulation on Windows 64-bit. See also Inno Setup install to SysWOW64 in 32Bit mode.
如果您不希望重定向(因为您的DLL是64位的),则可以使用 64bit
标志:
If you do not want the redirection (because your DLL is 64-bit), you can override the redirect using the 64bit
flag:
Source: "..."; DestDir: "{sys}"; Flags: 64bit
64位:在
Source
和DestDir
参数中使用时,导致{sys}
常量映射到64位系统目录,....这是默认行为. 64位模式安装.
64bit: Causes the
{sys}
constant to map to the 64-bit System directory when used in theSource
andDestDir
parameters, .... This is the default behavior in a 64-bit mode install.
或启用 64位模式安装.
Or enable 64-bit mode install.
[Setup]
ArchitecturesInstallIn64BitMode=x64 ia64
在64位模式下:
In 64-bit mode:
- 在[目录],[文件],[InstallDelete],[Run],[UninstallDelete]和[UninstallRun]中使用时,
{sys}
常量返回的System32路径默认情况下映射到64位系统目录. ]部分.这是因为安装/卸载会暂时禁用 WOW64文件系统重定向当这些部分访问文件/目录时.在其他地方,System32和{sys}
映射到32位系统目录,就像在32位进程中一样.
- The System32 path returned by the
{sys}
constant maps to the 64-bit System directory by default when used in the [Dirs], [Files], [InstallDelete], [Run], [UninstallDelete], and [UninstallRun] sections. This is because Setup/Uninstall temporarily disables WOW64 file system redirection when files/directories are accessed by those sections. Elsewhere, System32 and{sys}
map to the 32-bit System directory, as is normal in a 32-bit process.
这篇关于安装到{sys}的文件/DLL没有出现在C:\ Windows \ system32中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!