Clear vision armor games. You should know that if any of the registry values exist, then the server is pending a reboot. Knowing this, you then need to return True if any of the values exist and False if none of them exist. Wrap all of this up into a script and it should look like this (with some minor additions like Credential ). October 2012 IT Business Consulting Newsletter Registry Edits Can Kill Your Server! Every Windows server has a 'Registry', a place where essentially all of the server's configuration settings are stored. If the Registry is edited improperly and gets even a little messed up, the results can be bad to devastating. And also for Server 2012 & 2016. The solution is simple to Open Registry Editor on Windows, this example is for all Windows OS 10, 8.1, seven, ie 11 + 10, For all.
- Remove a File Type Association Using the Registry Editor. Let's say you've incorrectly associated a file type named.bak, and want to remove the association.Use these steps to remove the file association settings (for.bak) from the registry.
- To configure Windows registry audit settings on Windows Server 2012 and above On your target server, open Registry Editor: navigate to Start → Run and type 'regedit'. In the registry tree, expand the HKEYLOCALMACHINE key, right-click SOFTWARE and select Permissions from the pop-up menu.
How to get the Windows Version from the System Registry
Registry Editor Windows Server 2012 Product
The Windows version is stored in the registry key: HKLMSOFTWAREMicrosoftWindows NTCurrentVersion
The value CurrentVersion contains the version number as string(!):
Version Number: | Operating System: |
5.0 | Windows 2000 |
5.1 | Windows XP |
5.2 | Windows XP 64bit |
5.2 | Windows Server 2003 / R2 |
6.0 | Windows Vista / Windows Server 2008 |
6.1 | Windows 7 / Windows Server 2008 R2 |
6.2 | Windows 8 / Windows Server 2012 |
6.3 | Windows 8.1 / Windows Server 2012 R2 |
10.0 | Windows 10 (Preview) |
Registry Editor Windows Server 2012 Free
The value ProductName contains the system name, e.g. 'Windows 8.1'
Helper function to read a string value from the registry:
- Remove a File Type Association Using the Registry Editor. Let's say you've incorrectly associated a file type named.bak, and want to remove the association.Use these steps to remove the file association settings (for.bak) from the registry.
- To configure Windows registry audit settings on Windows Server 2012 and above On your target server, open Registry Editor: navigate to Start → Run and type 'regedit'. In the registry tree, expand the HKEYLOCALMACHINE key, right-click SOFTWARE and select Permissions from the pop-up menu.
How to get the Windows Version from the System Registry
Registry Editor Windows Server 2012 Product
The Windows version is stored in the registry key: HKLMSOFTWAREMicrosoftWindows NTCurrentVersion
The value CurrentVersion contains the version number as string(!):
Version Number: | Operating System: |
5.0 | Windows 2000 |
5.1 | Windows XP |
5.2 | Windows XP 64bit |
5.2 | Windows Server 2003 / R2 |
6.0 | Windows Vista / Windows Server 2008 |
6.1 | Windows 7 / Windows Server 2008 R2 |
6.2 | Windows 8 / Windows Server 2012 |
6.3 | Windows 8.1 / Windows Server 2012 R2 |
10.0 | Windows 10 (Preview) |
Registry Editor Windows Server 2012 Free
The value ProductName contains the system name, e.g. 'Windows 8.1'
Helper function to read a string value from the registry:
CString GetStringFromReg(HKEY keyParent, CString keyName, CString keyValName)
{
CRegKey key;
CString out;
if (key.Open(keyParent, keyName, KEY_READ) ERROR_SUCCESS)
{
ULONG len=256;
key.QueryStringValue(keyValName, out.GetBuffer(256), &len);
out.ReleaseBuffer();
key.Close();
}
return out;
}
Get the OS version (e.g. '6.3')
CString osversion = GetStringFromReg(HKEY_LOCAL_MACHINE, L'SOFTWAREMicrosoftWindows NTCurrentVersion', L'CurrentVersion'); Beer landwatermelon gaming.
Get the OS name (e.g. 'Windows 8.1')
CString osname = GetStringFromReg(HKEY_LOCAL_MACHINE, L'SOFTWAREMicrosoftWindows NTCurrentVersion', L'ProductName');