Skip to Content
author's profile photo Former Member
Former Member

Getting the current installed version information from SAP with VBScript

This is probably a question that is buried somewhere in here but so far no luck finding it so i'm throwing it out to everyone.

I am in charge of developing all of the distribution packages for SAP and any and all add-ons our corporate site requires. I'm using radia as a push tool and vbscript and wmi to manage the uninstall, install, patching, updating, and miscellaneous functions needed on each users system.

prior to my taking this position over an older version of SAP was distributed to several users with less than stellar results. due to the massive size of the Frontend GUI i've separated it out as a base stand alone install and packaged each Add-On with only the files it needs to complete the FE install. in order to guarantee my users have the newest version of the FE GUI on their systems i am doing some rudimentary checks based on the existence or no existence of the push directory of the older sap package on the users system. which works for now but is not the most graceful thing.

What i need is to be able to check right from a running vbscript what the current version and patch level the FE GUI is running at and any other components if possible, for now the FE GUI is the most important

Thanks for the help


<b>Ryan Strope

Distributed Services

(Software package development/testing)

Lockheed Martin Systems Integration Owego

(Cyber City Computers)


Quid quid latine dictum sit, altum videtur


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 02:51 PM


    I hope you find this of use. The only issue you will have is if the user has the SAP GUI running. If so, the getversion call will fail as it requires an exclusive lock on the file. I do not know why.

    Anyway, here is the code:

    Dim oShell, SAPdestdir, fso, i
    Set oShell = WScript.CreateObject("WScript.Shell")
    SAPdestdir = oShell.RegRead("HKLMSOFTWARESAPSAP SharedSAPdestdir")
    Wscript.Echo SAPdestdir
    Set fso = CreateObject("Scripting.FileSystemObject")
    SAPGuiVer = fso.GetFileVersion(SAPdestdir & "SAPGuiSAPGui.exe")
    WScript.Echo SAPGuiVer
    verInfo = Split(SAPGuiVer, ".")
    For i = 0 To UBound(verInfo)
    	WScript.Echo verInfo(i)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 02:54 PM

    I forgot to dim the verInfo and the SAPGuiVer variables.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.