开发者

Find architecture of system in Windows Installer

I have a application developed in C#. I am creating an installer for the app using Visual Studio Setup Project.

While installation, I want to execute an exe file which differs for 32 and 64 bit respectively. So I have to use different file for 32bit and 64bit.

For executing exe file, I have added "Custom Action" and that works also. But as said, the exe file开发者_运维问答 differs for system architectire. How can I knwo the architecture in installer and execute the respective file.

I tried the following : Check the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node - If found then also it returns "" and else also returns "", so of no use. VersionNT - that provides only version, I am more concerned with Architecture.

How can I achieve this ? VBS can do the work or not ? I don't know vbs, but know that it can be added to action and set its condition and little bit things like that.

If at all I create another 32bit app that detects the architecture, then also how would that work out with this suring installation ?

Any help is highly appreciated.

Thanks


Refer to the property VersionNT64 which is only set on 64-bit systems. If you need to differentiate between IA64 and x64, see also properties Intel64 and Msix64.

For example you may use a condition on your component or custom action that reads VersionNT64 if you want it to install or run on only 64-bit systems.


Look at second comment here: http://msdn.microsoft.com/en-us/library/ms724072%28VS.85%29.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜