Check if OS is 32 bit or 64 bit before application install in C# windows application

StackOverflow https://stackoverflow.com/questions/20117691

  •  03-08-2022
  •  | 
  •  

سؤال

I want to validate a 32 bit application install on a 64 bit machine where I need to show some information to the user before installing the application. Is this possible?

I am using the launch condition (Not VersionNT64) for 32 bit and (VersionNT64) for 64 bit but that is not working properly!

هل كانت مفيدة؟

المحلول

I'm not quite sure I understand your issue, but if I assume that you have two different installers, one for 32bits and one for 64 bits, you would have to make a small executable that will wrap the two installers and select the correct MSI file.

Environment.Is64BitOperatingSystem

will show you what kind of OS you are currently on.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top