Ok. There are two problems with the W2K adm files.
1) They are in Unicode. You can open them in word, then save as "text only" to a new name. This file is then readable and works fine.
2) They are huge. The system.adm file is still ~370 KB after converting to text. This causes the string lookup to fail, so all the string tokens get returned as their original "!!Token" format rather that the more readable string.
The string lookup fails because it uses ReadProfileString(), and this is limited to 64KB files in the API. The option here is to pre-parse the file and create a smaller strings file and use that for the lookup, or just to accept that the strings will not be displayed in friendly format.
Here is a small sample from W2K system.adm:
code:
Policy: !!GPOnlyPolicy
Key: Software\Policies
|-;CLASS
| Policy: !!GPOnlyPolicy
| Key: Software\Policies
| |-;#endif
Registry hive: MACHINE
|-!!AdministrativeServices
| Policy: !!NoSecurityMenu
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
| Entry: 'NoNTSecurity'=
| Policy: !!NoDisconnectMenu
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
| Entry: 'NoDisconnect'=
| Policy: !!DisableStatusMessages
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
| Entry: 'DisableStatusMessages'=
| Policy: !!VerboseStatus
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
| Entry: 'VerboseStatus'=
| Policy: !!Autorun
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
| Entry: 'NoDriveTypeAutoRun'=
| Policy: !!NoWelcomeTips
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
| Entry: 'NoWelcomeScreen'=
| Policy: !!Run
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run
| Policy: !!DisableExplorerRunOnceLegacy
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
| Entry: 'DisableLocalMachineRunOnce'=
| Policy: !!DisableExplorerRunLegacy
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
| Entry: 'DisableLocalMachineRun'=
| Policy: !!NoEncryptOnMove
| Key: Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
| Entry: 'NoEncryptOnMove'=
| Policy: !!AppMgmt_COM_SearchForCLSID
| Key: Software\Policies\Microsoft\Windows\App Management
| Entry: 'COMClassStore'=
| |-!!Login_Policies
| | Policy: !!Run_Logon_Script_Sync
| | Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
| | Entry: 'RunLogonScriptSync'=
| | Policy: !!Run_Startup_Script_Sync
| | Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
| | Entry: 'RunStartupScriptSync'=
| | Policy: !!Run_Startup_Script_Visible
| | Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
| | Entry: 'HideStartupScripts'=
| | Policy: !!Run_Shutdown_Script_Visible
| | Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
| | Entry: 'HideShutdownScripts'=
| | Policy: !!MaxGPOScriptWaitPolicy
| | Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
| | Entry: 'MaxGPOScriptWait'=
| | Policy: !!DeleteRoamingCachedProfiles
| | Key: Software\Policies\Microsoft\Windows\System
| | Entry: 'DeleteRoamingCache'=
| | Policy: !!EnableSlowLinkDetect
| | Key: Software\Policies\Microsoft\Windows\System
| | Entry: 'SlowLinkDetectEnabled'=
| | Policy: !!SlowLinkTimeOut
| | Key: Software\Policies\Microsoft\Windows\System
As you can see it kind of works
There are no values because I'm running it on a Win95 box.
I suggest that anyone who wants to use this for documenting settings should either adapt it to read the registry remotely, or spawn it as a parallel process, as it will take a long time to run due to the sheer size of the W2K .adm files.