K-9
asked on
VS.Net Setup Project - 32 and 64 bit
I created a vb.net program, which has a 32 and 64 bit .dll file. So, I created a setup project for each platform. However right now the user needs to determine which platform they are running and must run the correct install.
How can I automatically determine (through code, under the setup deployment) which platform the user is running and then run the correct install program?
How can I automatically determine (through code, under the setup deployment) which platform the user is running and then run the correct install program?
another way is using WMI:
Dim mso As New ManagementObjectSearcher(" SELECT *FROM Win32_OperatingSystem")
Dim qc As ManagementObjectCollection = mso.[Get]()
For Each mo As var In qc
Dim ostype As String = mo("OSArchitecture").ToStr ing()
Next
the value of ostype is: "64-bit" or "32-bit"
Dim mso As New ManagementObjectSearcher("
Dim qc As ManagementObjectCollection
For Each mo As var In qc
Dim ostype As String = mo("OSArchitecture").ToStr
Next
the value of ostype is: "64-bit" or "32-bit"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if u need another alternative let me know...
ASKER
Thanks!
if the following registry is exists than it is 64bit, otherwise it's 32bit.
HKEY_LOCAL_MACHINE\SOFTWAR
so in your vb.net code use the following:
Dim is64bit As Boolean = Registry.LocalMachine.Open