Change default action on connecting a USB device



When it comes to managing your computer's response to connecting a USB device, there are a few things to consider. As an IT administrator, it's important to understand the various settings and configurations that are available and how to implement them in order to ensure the safety and security of your network.

One of the most important settings to consider is the default action taken when a USB device is connected. By default, most operating systems will automatically detect the device and prompt the user with a list of options for what to do with the device. Depending on the type of device and the operating system in use, these options can include opening the device in File Explorer, launching a specific application, or even running a specific script.

In order to configure the default action taken when a USB device is connected, you'll need to use the Windows Registry Editor. To open the Registry Editor, press the Windows key and type “regedit” in the search box. Once the Registry Editor is open, navigate to the following key:

HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\UsbStor

Within this key, you'll find a few different values that can be changed to modify the default action taken when a USB device is connected. The first is the “Start” value, which determines whether or not the USB device is automatically detected and its contents are opened. This value can be set to either “1” (automatically detect and open the device) or “3” (do not automatically detect and open the device).

The second value is “NoDriveTypeAutoRun”, which determines what types of devices are automatically detected and opened. This value can be set to either “0” (automatically detect and open all USB devices) or “4” (automatically detect and open only specific types of USB devices).

The third value is “DefaultDriveType”, which determines the default action taken when a USB device is connected. This value can be set to either “1” (open the device in File Explorer) or “2” (launch a specific application or run a specific script).

Finally, the fourth value is “DefaultDriveTypeName”, which is the name of the application or script that is launched when the device is connected. This value should be set to the full path to the application or script that you wish to launch.

By making changes to these values, you can customize the default action taken when a USB device is connected. Keep in mind that making changes to the Windows Registry can have serious consequences, so it's important to back up your registry before making any changes. Additionally, it's also important to remember to restart your computer for the changes to take effect.

By understanding the various settings and configurations that are available for managing your computer's response to connecting a USB device, you can ensure the safety and security of your network. Additionally, by properly configuring the default action taken when a USB device is connected, you can have more control over what happens when a USB device is connected.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo