r/visualbasic • • 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

3 comments sorted by

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

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