We can verify the status of Automatic mounting of new volumes by looking at the value of the following key:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMountMgrNoAutoMount
If the value is set to 1: This indicates that Automatic mounting of new volumes is Disabled.
If the value is set to 0: This indicates that Automatic mounting of new volumes is Enabled.