本文介紹了如何使用Inno Setup將.sys文件安裝到c:\ windows \ system32 \ drivers中?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
我嘗試簡單地將.sys
文件安裝到
I try to simply install a .sys
file into
Source: "C:\myproject\driver.sys"; DestDir: "{win}\system32\drivers";
運(yùn)行設(shè)置后,我的driver.sys
始終安裝在
Once the setup ran, my driver.sys
is always installed into
C:\Windows\SysWOW64\drivers
知道為什么嗎?
推薦答案
默認(rèn)情況下,{win}\system32
您可以使用 64bit標(biāo)志來覆蓋它:
You can override this using 64bit flag:
Source: "C:\myproject\driver.sys"; DestDir: "{win}\system32\drivers"; Flags: 64bit
64位:當(dāng)在Source和DestDir參數(shù)中使用...時(shí),導(dǎo)致{sys}常量映射到64位系統(tǒng)目錄,....是這的默認(rèn)行為. 64位模式安裝.
64bit: Causes the {sys} constant to map to the 64-bit System directory when used in the Source and DestDir 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]中使用時(shí),由{sys}常量返回的System32路徑默認(rèn)情況下映射到64位系統(tǒng)目錄. ]部分.這是因?yàn)榘惭b/卸載會暫時(shí)禁用 WOW64文件系統(tǒng)重定向當(dāng)這些部分訪問文件/目錄時(shí).在其他地方,System32和{sys}映射到32位系統(tǒng)目錄,就像在32位進(jìn)程中一樣.
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.
正如上面提到的所有參考文獻(xiàn)所述,您最好使用 {sys}常量代替{win}\system32:
As mentioned is all the references above, you should better use {sys} constant instead of {win}\system32:
Source: "C:\myproject\driver.sys"; DestDir: "{sys}\drivers"
{sys} 系統(tǒng)的System32目錄.
{sys} The system's System32 directory.
例如:如果在條目上使用了{(lán)sys}\CTL3D32.DLL,并且系統(tǒng)的Windows系統(tǒng)目錄為"C:\ WINDOWS \ SYSTEM",則安裝或卸載會將其轉(zhuǎn)換為"C:\ WINDOWS \ SYSTEM \ CTL3D32.DLL"
For example: If you used {sys}\CTL3D32.DLL on an entry and the system's Windows System directory is "C:\WINDOWS\SYSTEM", Setup or Uninstall will translate it to "C:\WINDOWS\SYSTEM\CTL3D32.DLL".
在64位Windows上,默認(rèn)情況下,此常量返回的System32路徑映射到包含32位系統(tǒng)文件的目錄,就像在32位Windows上一樣. (可以通過啟用 64位模式來覆蓋.)
On 64-bit Windows, by default, the System32 path returned by this constant maps to the directory containing 32-bit system files, just like on 32-bit Windows. (This can be overridden by enabling 64-bit mode.)
這篇關(guān)于如何使用Inno Setup將.sys文件安裝到c:\ windows \ system32 \ drivers中?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持IT屋!
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報(bào)。