Open USB AutoRun batch file on all PCs?

Gr
11

Have nh question. I would like to create a USB stick which, when plugged into a PC / laptop, automatically opens a Windows batch file (you already know where the many beautiful input prompts open). I already created the batch file in the Windows 10 editor, as well as the AutoRun file. I already installed the software "AutoRunnerX" so that the USB opens the two or the batch file automatically when plugged in. My only problem now is that when I plug the USB into my PC everything works without problems, the command prompt window opens automatically and when I remove it everything stops. Everything fits so far. Should be so. But when I plug the USB into my buddy's PC, it only opens the directory so it shows me the batch file in the USB drive so that I would have to open it myself by double-clicking it. Why is it that everything works fine for me (the USB automatically opens the batch file after plugging in) and not with other PCs. Can someone help me there?

PS. The USB is only for private purposes with me in use, not what you understand wrong

Ro

The program is installed locally and not on the USB stick.

Your keyword to achieve this is autorun.inf:

https://de.wikipedia.org/...ki/Autorun

This allows you to save a file on the USB stick that tells the computer what to do as an autorun.
It should be said, however, that this only works if the function has been activated on the computer. (The convenience is activated by default)

Ha

AutoRUN (not AutoPLAY) is deactivated on Windows XP SP 2 on all Windows systems for security reasons.

You can avoid this on your PC with the AutorunnerX program. Your buddies didn't install that.

ta

In short: forget it.

At least current Windows versions no longer execute autorun files - for good and obvious security reasons.

Gr

First of all, thanks for the quick reply.

YOU mean the program is installed locally do you mean the AutoRunnerX?

Do I have to install the program on the USB? Is that possible?

And I already had the autorun.inf file on the USB stick as it says on the website.

I also looked in the task manager and in the settings for AUTOSTART there's the file "mobile" (called the batch file "mobile.bat") activated as autostart on my PC. Just like the AutoRunnerX is permanent in the auto start. At first I thought it had something to do with my buddy having to install this AutoRunnerX for it to work. But then I just deactivated the mobile file at autostart for the first time = result plugged in usb went without problems even if I deactivate the AutoRunnerX and mobile it still works as it should. Think times that it is probably not or. What surprises me he doesn't have these files on his PC, even if he opens the batch file manually several times (i.e. By double-clicking on the batch file) there's still nothing new in the autostart.

Gr

Does this mean I have to install this software on every computer where I want the USB to run automatically? Is there any other possibility? Perhaps another program or any software that can be installed on the USB that bypasses it?

Ha

No, there's no other way. Autorun is disabled for a very good reason.

Ro

Your AutoRunnerX is a program. Programs are installed on C: unless otherwise specified.
A program also needs entries in the register in order to function correctly.
If there's a portable variant, programs can also be installed on portable storage media.

You would have to install the program on every computer for your plan to work => Not applicable.

The Autostart.inf can only work if the Autostart from removable media is activated on the corresponding computer.

You can't create a stick that does something directly on ALL computers.

Gr

Okey then you can't do anything.

Gr

Yes, it makes sense if you think about it.

ta

With pleasure!

ma

But when I plug the USB into my friend's PC, it only opens the directory

It should be exactly like this. Otherwise everyone with a USB stick would be a security risk. Autorun is blocked by default for removable media.

Not everyone just wants to let go of a batch of jokes on the system. There are real experts with really nasty additions

Just imagine what my USB stick could do with your system, if you have already allowed the autorun function. Just like that in passing… (I don't necessarily need admin rights either, you give them to me after I've manipulated your user area by restarting your computer…

Forget the childish gimmicks and be happy that most systems (except yours) are secure.

what you did there could backfire, because your system is open like a barn door and your buddy would only need a stick…