|
-
Sep 21st, 2001, 11:22 AM
#1
Thread Starter
Addicted Member
Running commands on certain OS versions......(Resolved)
Hello,
I would like my app to run certain commands on certain operating system version.
Please help.....
vbBoy.
Last edited by vbBoy; Sep 23rd, 2001 at 09:50 AM.
-
Sep 21st, 2001, 12:02 PM
#2
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type
Private Const VER_PLATFORM_WIN32_NT = 2
Private Const VER_PLATFORM_WIN32_WINDOWS = 1
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
'Get OS Version
Dim WinVer As OSVERSIONINFO
WinVer.dwOSVersionInfoSize = Len(WinVer)
GetVersionEx WinVer
If (WinVer.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS) Then '=== Win95/98
'Do 9x commands
ElseIf (WinVer.dwPlatformId = VER_PLATFORM_WIN32_NT) Then '=== WinNT
'Do NT Commands
End If
-
Sep 21st, 2001, 02:45 PM
#3
Frenzied Member
Note that VB apps can only run on windows systems.
-
Sep 23rd, 2001, 09:49 AM
#4
Thread Starter
Addicted Member
Reply to Hack
Thanxs.
That did it.
vbBoy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|