I want to add a few lines to a script with the capacity to enable/disable the Autorun feature.
It's not a new concept. It's been covered countless times before, including here on StackExchange, and here by Microsoft.
The general consensus is, it's achieved by modifying the values of the following registry keys:
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutorun
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutorun
This worked for me in the past with Windows7 (Ultimate/Professional), but these registry keys don't appear to be present on Windows10 (Enterprise). Is this normal? Have they been superseded?
I did a search for related keywords and found the following that seem like they could be relevant.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\DisableAutoplay
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlersDefaultSelection\AutorunINFLegacyArrival\
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers\AutorunINFLegacyArrival\
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\AutorunINFLegacyArrival\
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\MSAutoRun\
HKLM\SOFTWARE\Microsoft\PolicyManager\default\Autoplay\DisallowAutoplayForNonVolumeDevices
HKLM\SOFTWARE\Microsoft\PolicyManager\default\Autoplay\SetDefaultAutoRunBehavior
HKLM\SOFTWARE\Microsoft\PolicyManager\default\Autoplay\TurnOffAutoPlay
HKLM\SYSTEM\CurrentControlSet\Services\cdrom\
HKLM\SYSTEM\CurrentControlSet\Services\Disk\
HKLM\SYSTEM\CurrentControlSet\Services\sfloppy\