NDog Posted September 12, 2011 Posted September 12, 2011 I am trying to write a script to return the version of Office 2010 installed According to this Microsoft Article http://support.microsoft.com/kb/2186281 there are certain SKUs that can be used to identify the installed version Each GUID uses the following format:{BRMMmmmm-PPPP-LLLL-p000-D000000FF1CE} Product ID SKU0011 Microsoft Office Professional Plus0012 Microsoft Office Standard 20100013 Microsoft Office Home and Business0014 Microsoft Office Professional 2010 Here is an example from my registry - Microsoft Office Professional Plus 2010 because of the 0011HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90140000-0011-0000-0000-0000000FF1CE} This would not be a good example (notice the additional string)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90140000-0011-0000-0000-0000000FF1CE}_Office14.PROPLUS_{047B0968-E622-4FAA-9B4B-121FA109EDDE} My problem is I do not know how to split the string to search for these 2 consitant values, being the PPPP being the SKU and the end part 000000FF1CE{xxxxxxxx-PPPP-xxxx-xxxx-x000000FF1CE} If anyone can help me use this information to return the Office 2010 Version installed I would be thankful
Bert Posted September 13, 2011 Posted September 13, 2011 (edited) is the number of characters in the string constant? If so just use stringsplit then stringleft or stringright to get the string you need. edit: stringmid would also do it. Edited September 13, 2011 by MPH The Vollatran project My blog: http://www.vollysinterestingshit.com/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now