Get answers from your peers along with millions of IT pros who visit Spiceworks.
Join Now

Is there any software that will open my application straight away when I plug in a USB with myapplication.exe?


Learn iaas
With tons of resources, progress tracking, and achievement badges you're bound to improve your IT skills.
TEST YOUR SMARTS
Which of the following retains the information it's storing when the system power is turned off?
  • GPU
  • RAM
  • CPU
  • ROM
88% of IT pros got this right.

10 Replies

· · ·
Matthew (Digium)
Serrano
OP
Matthew (Digium)

Brand Representative for Digium

You should be able to set up an autorun file, just like with a CD and have it at least prompt the user to auto-run the app or choose what to do.  The only other way to do it, I think, would be to create a small systray "companion" app for your app, that would check whenever a USB drive is plugged in, and if it finds your application, then it would auto-open/run it.

Would you like further details on either method?  You should be able to at least google the first.

0
· · ·
Big Green Man
Mace
OP
Big Green Man

Matthew (Digium) wrote:

I think, would be to create a small systray "companion" app for your app, that would check whenever a USB drive is plugged in, and if it finds your application, then it would auto-open/run it.

This part would be pretty easy to do with Powershell and Task Scheduler.

1
· · ·
Spartan117458
Thai Pepper
OP
Spartan117458

Keep in mind that most antivirus programs prevent this behavior, as it's a common method of distributing malware.

1
· · ·
badbanana
Chipotle
OP
badbanana

Jmeinzen wrote:

Is there any software that will open my application straight away when I plug in a USB with myapplication.exe?

your effort would be defeated as almost all anti-virus softwares now disables autoruns on removable media.

1
· · ·
Denis Kelley
Mace
OP
Denis Kelley

Not on my network, you don't. This is bad security practice.

1
· · ·
dbeato
Pure Capsaicin
OP
dbeato

Jmeinzen wrote:

Is there any software that will open my application straight away when I plug in a USB with myapplication.exe?

No need to do that, there is no reason to open an Executable automatically on a computer. Imagine how a device does that in multiple networks and breaks havoc in it. That would be terrible. 

0
· · ·
Matthew (Digium)
Serrano
OP
Matthew (Digium)

Brand Representative for Digium

I understand everyone who says “not on my network” and “bad practice it’ll get blocked”. My suggestion was going to be specific to this application/request, so as not to open up a can of worms for ALL files on ALL usb drives. It would only be designed to auto-open his specifically created application.

0
· · ·
PatrickFarrell
Ghost Chili
OP
PatrickFarrell

I understand it too, but also understand that we don't want to encourage this behavior, or everyone will want exclusions.  Open the USB, double click the file.  Could it be done?  Maybe.  Should it?  Absolutely not. 

2
· · ·
Travis2768
Serrano
OP
Travis2768

Rubber Ducky - https://hakshop.com/products/usb-rubber-ducky-deluxe

0
· · ·
Riso
Tabasco
OP
Riso

Denis Kelley wrote:

Not on my network, you don't. This is bad security practice.

Seconded.

0
Oops, something's wrong below.