Windows 10: How do I automatically run a batch file when a device is connected? (not autorun usb)

Discus and support How do I automatically run a batch file when a device is connected? (not autorun usb) in Windows 10 Ask Insider to solve the problem; I recently discovered scrcpy on android. For those that don't know its a great way to remotely control your android phone on pc. Latency is really low... Discussion in 'Windows 10 Ask Insider' started by /u/starlordofthegalaxy, Jun 15, 2020.

  1. How do I automatically run a batch file when a device is connected? (not autorun usb)


    I recently discovered scrcpy on android. For those that don't know its a great way to remotely control your android phone on pc. Latency is really low and framerate is smooth. I'm looking for a seamless and automatic way of running scrcpy command as soon as I connect my phone. Any help would do, even if just pointing me to the right direction. Thanks in advance.

    submitted by /u/starlordofthegalaxy
    [link] [comments]

    :)
     
    /u/starlordofthegalaxy, Jun 15, 2020
    #1
  2. robal Win User

    USB Autorun

    Hi,

    Try pointing autorun to batch file, containing the line:

    java -jar myjava.jar
     
    robal, Jun 15, 2020
    #2
  3. lx07 Win User
    autorun batch file usb

    autorun.inf has been disabled on usb stick since at least Windows 7 for security reasons

    There are programs you can install on your PC to monitor your USB port and then do something like this Leelu Soft: APUSB 47 1.0

    Alternatively you could make a batch file like this on your PC and run it when you insert a USB. Batch File for AutoRun.inf - Stack Overflow

    If you are trying to write something to run on any PC then there is no legitimate way of doing it - it will not work as this functionality was disabled to stop spreading malware.

    It might help a bit if you explained what you are wanting to do. What you want to run, on what PC, whether you want to run something when a specific USB is inserted or when any USB is inserted (a very bad idea imo).
     
  4. mars Win User

    How do I automatically run a batch file when a device is connected? (not autorun usb)

    USB Autorun

    Hi Guys!
    I have created a Java program and build it into a JAR file. What I want is to autorun this Jar file. I already created an autorun.inf file but still no good. My code goes like this..

    [autorun]
    open=myjava.jar
    action=Run myjava Program
    icon=myjava.jar
    label=theis

    **I already copied my inf file in my USB and I also copied myjava.jar file but there's no good.

    hope you can help me. *Smile How do I automatically run a batch file when a device is connected? (not autorun usb) :)

    OS: Windows 7
    USB: Generic
     
Thema:

How do I automatically run a batch file when a device is connected? (not autorun usb)

Loading...
  1. How do I automatically run a batch file when a device is connected? (not autorun usb) - Similar Threads - automatically run batch

  2. I can't run autoruns

    in Windows 10 Ask Insider
    I can't run autoruns: Hello guys I am stumped because I tried to run autoruns to check for malware or something like that but I only get Restrictions pop-up I dont know what to do submitted by /u/Hoizu22 [link] [comments] https://www.reddit.com/r/Windows10/comments/1e9di2c/i_cant_run_autoruns/
  3. Cant run Batch file

    in Windows 10 Gaming
    Cant run Batch file: When i try to run a batch file all it says is this app can't run on your pc i tried going to my property and going to compatibility but it isn't there im on windows 11 btw but if someone can pls help...
  4. Cant run Batch file

    in Windows 10 Software and Apps
    Cant run Batch file: When i try to run a batch file all it says is this app can't run on your pc i tried going to my property and going to compatibility but it isn't there im on windows 11 btw but if someone can pls help...
  5. How do I get AutoRun to work with USB drives?

    in Windows 10 Ask Insider
    How do I get AutoRun to work with USB drives?: Title says it all. How do I get AutoRun working with USB drives in Win10? submitted by /u/chungus_is_gay [link] [comments] https://www.reddit.com/r/Windows10/comments/gjw1hw/how_do_i_get_autorun_to_work_with_usb_drives/
  6. Automatically Run Batch Script

    in Windows 10 Installation and Upgrade
    Automatically Run Batch Script: Hi everyone When the windows installation is finished, automatically run batch script. How can I do that? Thanks *Wink 122531
  7. Running an uneditable Batch file

    in AntiVirus, Firewalls and System Security
    Running an uneditable Batch file: Hi people, Got a task to run a certain CMD command on a number of PCs as administrator. So I thought i would create a batch file doing this. This is not the issue. The issue is that I am unable to lock down successfully so people cannot just edit the file to see the admin...
  8. USB autorun

    in Windows 10 Drivers and Hardware
    USB autorun: I have a freshly installed Win10 - now upgraded to v1607 - that shows the contents of USB sticks (in a USB3 socket) when the stick is inserted - THAT is what I want. I also have Win10 upgrade from Win7 - still at v1511 because the v1607 crippled it according to a Microsoft...
  9. How to run batch file with powershell

    in Windows 10 Network and Sharing
    How to run batch file with powershell: I created a basic batch file that uses "net share" to share a local path. I saved the batch file. When I double click the file I get "access is denied"... note, I am logged on as a admin. Anyways... I figure it has to be run using power shell. I do not know much about...
  10. autorun batch file usb

    in Windows 10 Support
    autorun batch file usb: I want run a bat file from usb stick while inserting it plz help me 63747

Users found this page by searching for:

  1. when night light

    ,
  2. How to execuate a .bat file automatically whenever a usb is connected to my pc