不安装,我试图让安装脚本:在32位PCNSIS脚本在正确的目录
- :tapi_32bits.tsp在
C:\windows\system32
- 在64位PC:tapi_64bits.tsp在
C:\Windows\System32
和tapi_32bits.tsp在C:\Windows\SysWOW64
这是我写的剧本:
; The name of the installer
Name "TAPI Installer"
; The file to write
OutFile "TAPI Installer"
; The default installation directory
InstallDir $DESKTOP
;--------------------------------
; Install to the correct directory on 32 bit or 64 bit machines
Section
IfFileExists $WINDIR\SYSWOW64\*.* Is64bit Is32bit
Is32bit:
; Set output path to the installation directory.
SetOutPath $SYSDIR
; Put file there
File tapi_32bits.tsp
; SectionEnd MessageBox MB_OK "32 bit"
SetRegView 32
StrCpy $INSTDIR "$PROGRAMFILES32\LANDesk\Health Check"
GOTO End32Bitvs64BitCheck
Is64bit:
; install in C:\Windows\System32
SetOutPath $WINDIR\System32\
; file to put there
File tapi_64bits.tsp
; install in C:\Windows\SysWOW64
SetOutPath $WINDIR\SysWOW64
; file to put there
File tapi_32bits.tsp
;SectionEnd MessageBox MB_OK "32 bit"
SetRegView 32
StrCpy $INSTDIR "$PROGRAMFILES32\LANDesk\Health Check"
GOTO End32Bitvs64BitCheck
MessageBox MB_OK "64 bit"
SetRegView 64
StrCpy $INSTDIR "$PROGRAMFILES64\LANDesk\Health Check"
End32Bitvs64BitCheck:
SectionEnd
;--------------------------------
但在64位的PC上,它将两个文件(tapi_64bits.tsp和tapi_32bits.tsp)放在Syswow64文件夹中。安装程序会说它安装在正确的文件夹中,但这两个文件都位于Syswow64文件夹中。我究竟做错了什么?
似乎确定sysnative被替换SYSTEM32在Win 7 X64的 – Tanguy
@Tanguy:不,它不是!在64位应用程序中,只有%windir%\ system32,它包含真正的64位系统文件(32位系统文件位于SysWow64中)。在32位应用程序中,%windir%\ sysnative包含64位系统文件,%windir%\ system32包含32位系统文件... – Anders