+ Reply to Thread
Results 1 to 9 of 9

Thread: Safe way to check for XP service pack

  1. #1

    Default Safe way to check for XP service pack

    I need to figure out if user is on Windows XP, and which service pack.

    I use Get System Information(Service Pack Number) to get the service pack number, but I'm unsure what to use to tell if user is on a Window XP OS ?

  2. #2
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Safe way to check for XP service pack

    Hello,

    You have several options here. The easiest one (IMO) is to check the %WINVER% variable value. If the value is $WINXP$ (see Common Definitions.sbi) then the machine is running XP.

    So you can use:

    If %WINVER% Equals "$WINXP$" Then
    you are running xp
    End

    Does this help?

  3. #3

    Default Re: Safe way to check for XP service pack

    Thanks!

    Is it also possible to get the language of the Windows install? (Not current selected language, but which language version of the OS was installed)

  4. #4
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Safe way to check for XP service pack

    Hello,

    Yes, please try the %CURLNG% variable. It returns the currently active Windows language ID.

    Does this help?

  5. #5
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Safe way to check for XP service pack

    BTW, another cool way is to use Get File Information (File Language) on kernel32.dll ;-)

    For example:

    Set Variable %OSLANGUAGE% to ScriptItem->Get File Information(File Language (Resource)) of file "%SYS32DIR%\kernel32.dll"

  6. #6

    Default Re: Safe way to check for XP service pack

    This returns 1044 for me, which is according to your manual: Norwegian (Bokmal) 1044

    Now, my current language setting in Windows IS 1044 Norwegian, but my Windows installation is in English. And this is what I need to find out..

  7. #7
    Join Date
    Mar 2004
    Posts
    4,308

    Default Re: Safe way to check for XP service pack

    My second idea should work because it returns the language used to compile that Windows version

  8. #8

    Default Re: Safe way to check for XP service pack

    Yes, it worked. Didn't see that reply before I had sent the answer You're too fast Friedrich

  9. #9

    Default Re: Safe way to check for XP service pack

    <G> Thank you

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 10-02-2006, 03:30 AM
  2. Cannot open and compress service file - error
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 6
    Last Post: 12-06-2005, 04:40 AM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •