Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7767345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:39:14+00:00 2026-06-01T15:39:14+00:00

I’m in the process of writing a deployment script for Office 2010 and several

  • 0

I’m in the process of writing a deployment script for Office 2010 and several other applications, one of the issues we ran into in testing were some computers still had XP SP2, so I wanted to code in a a safety measure for this.

I came up with this

Set colOperatingSystem = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystem
ServicePack = objOperatingSystem.ServicePackMajorVersion
Next

IF not ServicePack = "3" Then

MsgBox "WARNING: prerequisite to installing Microsoft Office 2010 Professional you must first install service pack 3" & VbCrlf & "your current Service Pack Version is " & ServicePack

ELSE

'Do Nothing

END IF

I plugged it into an XP SP2 machine and got the warning popup On_WindowLoad, so I was pleased, but then as soon as I plugged it into my windows 7 machine it throws the same message, digging into powershell a bit I realize that since windows 7 reports it’s ServicePackMajorVersion number as “1” so it doesn’t meet the conditional,

Hoping someone might have an idea how to write an IF / Conditional statement to bypass the Windows 7 PC’s, I looked at build number which is 7601, but not sure how I would nest these

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:39:15+00:00Added an answer on June 1, 2026 at 3:39 pm

    To test if you are running under Windows XP you must check if the Version property of the Win32_OperatingSystem WMI class start with 5.1

    Check this sample

    strComputer = "."
     Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")        
    Set colOperatingSystem = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
    
    For Each objOperatingSystem in colOperatingSystem
    ServicePack = objOperatingSystem.ServicePackMajorVersion
    Version = objOperatingSystem.Version
    
    Next
    
    IF Mid(Version,1,3)="5.1" And  not ServicePack = "3" Then
    
    MsgBox "WARNING: prerequisite to installing Microsoft Office 2010 Professional you must first install service pack 3" & VbCrlf & "your current Service Pack Version is " & ServicePack
    
    ELSE
    
    'Do Nothing
    
    END IF
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from
I have thousands of HTML files to process using Groovy/Java and I need to
I am writing an app with both english and french support. The app requests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.