Results 1 to 4 of 4

Thread: Running commands on certain OS versions......(Resolved)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    137

    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.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    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

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Note that VB apps can only run on windows systems.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    137

    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
  •  



Click Here to Expand Forum to Full Width