The setting you are looking for is stored in the registry, here:
HKEY_CURRENT_USER\SOFTWARE\Autodesk\AutoCAD\Rxx.x\xxxx-xxxx:xxx\Profiles\[Profile_Name]\Dialogs\AcLayerApps:LayerStatesManager
It's a 32-bit DWORD named "LayerNotFound".
1 = checked
0 = not checked
You can read / write this setting using lisp, like this:
Code:
(vl-registry-read
(strcat "HKEY_CURRENT_USER\\" (vlax-machine-product-key) "\\Profiles\\" (getvar "cprofile") "\\Dialogs\\AcLayerApps:LayerStatesManager")
"LayerNotFound"
)
(vl-registry-write
(strcat "HKEY_CURRENT_USER\\" (vlax-machine-product-key) "\\Profiles\\" (getvar "cprofile") "\\Dialogs\\AcLayerApps:LayerStatesManager")
"LayerNotFound" 0
)