After using the @regexist function with a offline registry the loaded registry can't unloaded.
We get a access denied message.
tested:
type regexist_loaded_hives.bat
Result:
Maybe its a windows issue or something is wrong with this batch file.
Terminating of TCC unloads the registry.
We get a access denied message.
tested:
type regexist_loaded_hives.bat
Code:
setlocal
unalias *
echo TCCver=%@VerInfo[%_cmdspec,FileVersion] OSbuild=%_OSBuildEx
set msRegHKCU=HKCU\Software\Microsoft\Clipboard
set msRegLoadedHKCU=HKLM\HiveHKCU\Software\Microsoft\Clipboard
set HKCUFile=R:\NTUSER.DAT
echo.
reg load HKLM\hiveHKCU %HKCUFile>nul
echo Online registry key exist = %@regexist[%msRegHKCU]
reg unload HKLM\hiveHKCU>nul & echo 1.unload returnCode=%?
reg load HKLM\hiveHKCU %HKCUFile>nul & echo load returnCode=%?
echo.
echo offline Registry Key Loaded Hive Exist = %@regexist[%msRegLoadedHKCU]
reg unload HKLM\hiveHKCU>nul & echo 2.unload returnCode=%?
Result:
Code:
TCCver=28.02.18 OSbuild=22000.556
Online registry key exist = 1
1.unload returnCode=0
load returnCode=0
offline Registry Key Loaded Hive Exist = 1
ERROR: Access is denied.
2.unload returnCode=1
Maybe its a windows issue or something is wrong with this batch file.
Terminating of TCC unloads the registry.