Quantcast
Channel: Group Policy forum
Viewing all articles
Browse latest Browse all 19997

RegGetValue returned data type differs from the data type mentioned in admx file for the gpo setting

$
0
0

For the gpo setting: "Network directories to sync at Logon/Logoff time only", in the corresponding UserProfiles.admx file, datatype is mentioned as REG_EXPAND_SZ:

<text id="CscSuspendDirectories_Message" valueName="CscSuspendDirs" maxLength="4096"expandable="true" />

(expandable="true" means REG_EXPAND_SZ instead of REG_SZ as mentioned in here )

but i get the data type as REG_SZ when reading that subkey value using RegGetValue method.

Am using the statement: RegGetValue(hKey, NULL, achValue, RRF_RT_ANY, &dataType, NULL, &size);

dataType and size are of type DWORD.

hKey is pointing to registry key "Software\Policies\Microsoft\Windows\System"

and achValue is referring to "CscSuspendDirs"

am getting dataType as 1 (REG_SZ) when the function call returns which differs from what mentioned in admx file for the setting.

How to get the correct data type?


Viewing all articles
Browse latest Browse all 19997

Trending Articles