开发者

Wix trying to install a ps1 script to both the system32 and syswow64 directory

I am trying to use a 32 bit wix installer to install to the powershell directory c:\windows\????\windowspowershell\v1.0

i have hard coded the 32bit directory

and i am trying to read the registry to return the 64 bit location.

all works fine on a 32bit machine, the registry gets read with the correct value and the file is installed to the correct place.

however when ru开发者_运维百科nning on a 64bit machine (server 2008 R2) the registry picks up the correct 64 bit location but my hard coded 32 bit location is overwritten with the 64 bit registry value.

what is going on?

is there a better way of doing this?

what i have is a single ps1 script that needs to be installed to the powershell directory, if there is a 64 bit and 32 bit directory the same file should be copied to both locations

thanks

James


Windows Installer was designed to be platform specific. X86 packages can only write to X86 locations and X64 packages can only write to X64 locations. There are some hacks that allow you to get around this but they aren't supported. The official Microsoft solution is to create multiple MSI's and use a bootstrapper to chain them together ( ugly ) but you can also use a custom action to copy the file to the secondary location.

Sorry, no good solutions on this one IMO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜