Share via

batch file

Anonymous
2018-11-28T21:35:51+00:00

I want a BAT file to be executed when a USB plugged in to the PC. How can I do it?

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. DaveM121 891.9K Reputation points Independent Advisor
    2018-11-28T22:56:43+00:00

    Hi Mary

    Is the bat file on the USB Flash Drive and you want that to Autorun, or is that bat file on your PC and you want that to run when any USB flash drive is connected to the PC?

    Was this answer helpful?

    0 comments No comments
  2. Igor Leyko 111K Reputation points Independent Advisor
    2018-11-28T21:44:08+00:00

    Hi,

    probably you may use Task Scheduler. What USB device are you talkin about?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2018-11-28T21:38:35+00:00

    Hi Mary, unfortunately Windows doesn’t provide an in-built feature to execute a Bat file when a USB is plugged in.

    Was this answer helpful?

    0 comments No comments