Auto-Execute EXE in Window When USB Plugged In

Piolo Labios 0 Reputation points
2025-11-23T17:44:18.4533333+00:00

Hello is there a possible why that and exe file from my flash drive will be able to auto run when i plug in window 11

Windows development | Windows Performance Toolkit
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2025-11-23T17:44:24.11+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    AutoPlay can be used to provide your app as an option when a user connects a device to their PC, including USB flash drives. However, Windows 11 has restrictions on executing EXE files automatically from USB drives due to security concerns. Instead, you can implement AutoPlay activation for your app to launch when the device connects to the system. This involves specifying how your app should respond to AutoPlay notifications in your device metadata package and adding the necessary declarations in your app manifest.

    For more detailed implementation, you can refer to the guidelines on how to register your app for AutoPlay activation and ensure that it launches when the USB device is connected.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.