The following sample 'UsingRegistry' is shipped as part of the default installation, so the first thing to do is:
- Go to the Rapise Start Page
- Click on Fetch Samples to make sure that you have all the latest samples
- Browse the samples to see the UsingRegistry sample.
The sample demonstrates the usage of the Windows Registry:
- The sample gets the registry values to determine the OS type (Win7/8/10/2008/2012, etc)
- The sample also gets the OS version and the Owner
- The sample uses the standard object WScript.Shell and its method RegRead to access the Registry
//Creates an WScript.Shell
var shl = new ActiveXObject("WScript.Shell");
var osType = GetOsType();
machins OS type", true,
var osVersion = GetOsVersion();
service pack version", true,
var osOwner = GetOsOwner();
registered owner of OS", true,
* Reads OS type from registry.
* @returns OS type.
* Reads OS service pack version from
* @returns Service pack version.
*Reads OS registered owner from registry.
*@returns OS registered owner.
For more information on the Windows API / Scripting Host methods being used, please refer to: