• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

script to auto run a usb .exe file

TriggerHappy101

Golden Member
Is there a way I can get my usb device to auto run a .exe file when it is plugged into ANY pc without configuration to the PC? I ask because I have a firefox portable installed on my USB drive and i want it to auto launch as soon as it detects the drivers. I want it to auto launch the "FirefoxPortable.exe" file inside the root directory of its drive.
 
Originally posted by: TriggerHappy101
Is there a way I can get my usb device to auto run a .exe file when it is plugged into ANY pc without configuration to the PC? I ask because I have a firefox portable installed on my USB drive and i want it to auto launch as soon as it detects the drivers. I want it to auto launch the "FirefoxPortable.exe" file inside the root directory of its drive.

Not if I can help it (the ANY part). For your own use, you could create a service that would watch for the PnP ID and then check the device id to run the exe. Otherwise, not a prayer. Even CDs running autorun are a huge security risk (the Sony Rootkit being a prime example), so you are already fighting against folks turning off any chance of autorun. In the next, next gen OS, even the device may not plug in unless it has been trusted.
 
I have a Sansdisk MicroCruzer memory stick that has a automatic run partition whenever it gets plugged in.

Therefore it must be possible
 
Depends if the pc has autorun enabled but surely you can just create an autorun.inf with:
[autorun]
OPEN=firefox.exe

or something similar.

Edit: try Autorun.ini too
 
Ive tried Autorun.ini and Autorun.inf and Autorun.bat with the command
[autorun]
OPEN=FirefoxPortable.exe

Ive also tried making the Autorun.ini and Autorun.inf file open Autorun.bat that has the command
"FirefoxPortable\FirefoxPortable.exe"
Which launchs the program if I manualy run the .bat file. But doesnt work on autorun.

Any ideas to get it to work? How do I double check if i have autorun enabled? I know I have Autoplay enabled.
 
Back
Top