REM User settings STEP 2: set currently unloaded registry user entries
REM This will fail to load registry entries for users that are currently logged in (those are already set by STEP 1) FOR /D %%G in ("%ALLUSERSPROFILE%\..\*") DO IF NOT "%%G"=="%ALLUSERSPROFILE%" IF EXIST %%G\NTUSER.DAT ( REG LOAD HKU\OneUser "%%G\NTUSER.DAT" >> NUL: call usersettings.bat HKEY_CURRENT_USER\OneUser REG UNLOAD HKU\OneUser >> NUL: ) REM Default user (for new users) - This one was probbably hidden from previous loop REG LOAD HKU\OneUser "%ALLUSERSPROFILE%\..\Default User\NTUSER.DAT" >> NUL: call usersettings.bat HKEY_CURRENT_USERHKEY_USERS\OneUser
REG UNLOAD HKU\OneUser >> NUL:
)
REM Default user (for new users) - This one was probbably hidden from previous loop
REG LOAD HKU\OneUser "%ALLUSERSPROFILE%\..\Default User\NTUSER.DAT" >> NUL:
call usersettings.bat HKEY_USERS\OneUser
REG UNLOAD HKU\OneUser >> NUL:
</source>