function GetOSVersion () {
	var oComputer;
	var n;
	var opSys;
	var strName = ".";

	oComputer = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\\\.\\root\\cimv2").ExecQuery("select * from Win32_OperatingSystem");

	n = new Enumerator (oComputer);

	for (;!n.atEnd(); n.moveNext()) {
		opSys = n.item();
		return (opSys.Version);
	}
}

function GetDriverSigningPolicy () {
	var oDriverSigningPolicy;
	var nDriverSigningPolicy;

	try {
		oDriverSigningPolicy = RegRead ("HKLM\\Software\\Microsoft\\Driver Signing","Policy");
		nDriverSigningPolicy = oDriverSigningPolicy[0];
	} catch (e) {
		LogEvent (2, "HKLM\\Software\\Microsoft\\Driver Signing" + " Does not exist");
		nDriverSigningPolicy=-1;
	}

	return (nDriverSigningPolicy);
}

function SetDriverSigningPolicy (nPolicy) {
	var wsh;
	var nDriverSigningPolicy;

	// Get WSH Object
	wsh = WScript.CreateObject("WScript.Shell");

	try {
		wsh.regWrite ("HKLM\\Software\\Microsoft\\Driver Signing\\Policy", nPolicy, "REG_BINARY");
	} catch (e) {
		LogEvent (2, "HKLM\\Software\\Microsoft\\Driver Signing\\Policy" + " Could not be created");
		nDriverSigningPolicy=-1;
	}
}

function AddStartupRunPolicy (strName, strCMD) {
	var wsh;

	// Get WSH Object
	wsh = WScript.CreateObject("WScript.Shell");

	try {
		wsh.regWrite ("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\" + strName, strCMD, "REG_SZ");
	} catch (e) {
		LogEvent (2, "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\" + strName + "Could not be created");
	}
}