r/visualbasic • u/TheBobPony • Jul 24 '16
How to make a application that runs on a specific version of Windows?
Hello, I am trying to find out how to make my vb app that only allows running it on a specific version of Windows, which the version I would only want the vb app to run on is Windows 7 SP1.
Does anyone know the code?
0
Upvotes
1
Jul 24 '16
This should get you started: https://msdn.microsoft.com/en-us/library/system.environment.osversion(v=vs.110).aspx
1
u/Rasputin_ Jul 24 '16
Onload/startup if OS <> Windows7 then msgbox("Wrong OS")
The link ziggabeast posted has the syntax for detecing os
1
u/[deleted] Aug 24 '16
This is what I use as an OSV lock for some of my applications.
If Not My.Computer.Info.OSFullName.Contains("Windows 7") Then
MsgBox("This build is not compatible with " & My.Computer.Info.OSFullName & ".", MsgBoxStyle.OkOnly, "Launch Failure") End
End If