Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How do I get the exact Version and service pack of my Operating System using SilkTest?

How do I get the exact Version and service pack of my Operating System using SilkTest?

Problem:

How do I get the exact Version and service pack of my Operating System using SilkTest?

Resolution:

QUESTION
----------------------------------

How do I get the exact Version and service pack of my Operating System using SilkTest?

ANSWER
----------------------------------

For example: when you use SYS_GetVersion() it returns 5.1 for both WinXP SP1 and WinXP SP2. SYS_GetName() returns Windows XP for both platforms.

Unfortunately SilkTest will not return the operating system version when set to call GetVersionEx in kernel.dll. As it was necessary in one project to distinguish between the two XP Service Pack versions by script, a Visual Basic app (GetOSVer) was created to do the job. The following support files from Microsoft are also needed:

Microsoft VB6 Support files

  • You will first need to install the support files (downloaded from the url above) on any machine that you need to get the OS version for. They are pure Microsoft files and will not need to be uninstalled when you have finished testing.

  • To install the O/S app, unzip GetOSVer into your SilkTest project directory. To uninstall it, delete GetOSVer.exe and GetOS.ini.

    NOTE: GetOSVer will return the operating system version and service pack version for ALL windows platforms.

  • It is invoked from SilkTest by the SYS_Execute method and then SilkTest is paused while the app gets the required information. There is also a small test script in the archive for you to work with. Depending on the speed of the target machine, it may be necessary to increase the value of the Sleep() command to allow GetOSVer to finish writing to file.

    The app works in two modes; silent and manual. As supplied it is set to silent mode. If you want to see the app working, open up the getos.ini file and set SilentGet=0. Please remember though to reset SilentGet to 1 (one) before attempting to run it from SilkTest. If you do not, the app will simply wait for ever for a manual input and the test will fail.


This information is repeated in the readme.doc included in the archive.

THIS IS SUPPLIED AS IS AND THERE IS NO SUPPORT FOR IT.

 GetOSVer.zip

Related documents:


Old KB# 21340

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:19
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.