Now i know you can do the following code to get it to run as administrator in Windows 7..
Dim myProcess2 As New System.Diagnostics.Process()
Dim startInfo2 As New ProcessStartInfo
startInfo2.FileName = Application.StartupPath & "\installs\Assistant\RegisterSureFire.exe"
startInfo2.Verb = "runas"
myProcess2.StartInfo = startInfo2
Application.DoEvents()
myProcess2.Start()
But when you do this in windows XP, that box comes up asking if u want to run it in current user or in admin. Then usually my customer gets confused and gives us a call and blah blah… Is there a way i can make it detect the windows version and if its Below windows Vista then don’t use the “runas”?
Or any other helpful methods would be great also!
You’re looking for the
Environment.OSVersionproperty.