usvpn Posted January 30, 2014 Posted January 30, 2014 Howdy, I want my application to run only on Win7: Dim MyVersion As Version = Environment.OSVersion.Version Dim SevenVersion As New Version(6, 1, 0, 0) If Not Version.op_GreaterThanOrEqual(MyVersion, SevenVersion) Then End Above code will allow to run on 7 or later, how to change the condition to run only on 7? Thanks. Quote
Administrators PlausiblyDamp Posted February 3, 2014 Administrators Posted February 3, 2014 You could always use the .CompareTo method of a version object - if you use it to compare two versions and it returns 0 then they are the same. Out of interest is there a reason why you only want it to run on Windows 7 and not later versions? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Administrators PlausiblyDamp Posted February 3, 2014 Administrators Posted February 3, 2014 You could always use the .CompareTo method of a version object - if you use it to compare two versions and it returns 0 then they are the same. Out of interest is there a reason why you only want it to run on Windows 7 and not later versions? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.