Solved

Finding out Service pack information from Registry in Windows 98

Posted on 2004-10-26
249 Views
Last Modified: 2010-04-17
Hi,
   How to find out service pack information from Registry in Windows 98 Operating system?

                                                  Thanks,

                                                                              Binu Emmes.

 
 
0
Question by:binu_emmes
    2 Comments
     
    LVL 24

    Accepted Solution

    by:
    In VB use this

    Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
    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 Sub Form_Load()
        Dim OSInfo As OSVERSIONINFO, PId As String
        'KPD-Team 1998
        'URL: http://www.allapi.net/
        'KPDTeam@Allapi.net
        'Set the graphical mode to persistent
        Me.AutoRedraw = True
        'Set the structure size
        OSInfo.dwOSVersionInfoSize = Len(OSInfo)
        'Get the Windows version
        Ret& = GetVersionEx(OSInfo)
        'Chack for errors
        If Ret& = 0 Then MsgBox "Error Getting Version Information": Exit Sub
        'Print the information to the form
        Select Case OSInfo.dwPlatformId
            Case 0
                PId = "Windows 32s "
            Case 1
                PId = "Windows 95/98"
            Case 2
                PId = "Windows NT "
        End Select
        Print "OS: " + PId
        Print "Win version:" + Str$(OSInfo.dwMajorVersion) + "." + LTrim(Str(OSInfo.dwMinorVersion))
        Print "Build: " + Str(OSInfo.dwBuildNumber)
        Print "SP: " + fTrimNull(OSInfo.szCSDVersion)
    End Sub
    Private Function fTrimNull(strIn As String) As String
    Dim intPos As Integer
        intPos = InStr(1, strIn, vbNullChar)
        If intPos Then
            fTrimNull = Mid$(strIn, 1, intPos - 1)
        Else
            fTrimNull = strIn
        End If
    End Function

    0
     

    Author Comment

    by:binu_emmes

    Hi,
      Thank You hes. Actually I wanted it in Pascal. I converted your code to pascal. It worked..

                                                                    Binu.M.S






                       
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Cisco Complete Network Certification Training

    If you’re an IT engineer or technician, it's time you take your career to the next level. This elite training bundle is brimming with all of the information you need to learn to sit for Cisco CNNA, CCNP, and CCENT certification exams.

    Suggested Solutions

    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now