VSTO & .NET & Excel

March 25, 2011

Running Windows 32-bit or 64-bit?

Filed under: .NET & Excel, Excel, VSTO & Excel — Dennis M Wallentin @ 10:15 pm

Recently I worked on a project that required to detect if a 32-bit operating system were running or not. Initially I thought it would be necessary to read from the Windows Registry but it turned out to much easier then that.

The following snipped code requires VS 2010 and that we use .NET Framework 4.0.

Private Sub btnCheck_Click(sender As System.Object,
 e As System.EventArgs) _
 Handles btnCheck.Click

 '.NET Framework 4.0 and VS 2010 makes it easy.

 If Environment.Is64BitOperatingSystem Then
 'code goes here...
 'code goes here...
 End If

 End Sub

That wasn’t hard at all 😉

Kind regards,


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: