Make a autorun USB that executes a shell script on the USB drive?


Recommended Posts

how do i make a autorun usb that executes a shell script? this would be only for my system so if there is something i have to enable, no problem (i imagine sumthing like this disabled for security reasons)

i believe the shell used wud be either ash or busybox. i think its busybox but cant confirm.

thank u.

Ok, I'm no expert by any means, but surely creating an autorun.inf script on the USB stick will mean that when you plug it in to a computer the script will run?

EDIT: I should probably specify that the file needs to be called "autorun.inf" if you want it to automatically run. Any other name won't do the same thing.

EDIT 2: Whoops, I forgot to check the forum. autorun.inf may not work on Linux. Let me check it out.

EDIT 3: Ok. Apparently by default Linux doesn't come with an autorun option. You can download an application that will create the autorun command though. Look here.

You can place a file named "autorun" on the root of the usb stick and you'll be prompted when you plug the usb drive. I didn't get it to actually run though, it craps with an "error autorunning" (maybe I'm doing something wrong).

Anyway you won't get the script to start automatically that way. If you need a script to run from the USB when plugged without prompting you'll have to define udev rules, something like what's explained here: http://www.panticz.de/node/629

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • That adverting your referring to can basically be turned off with a few Windows settings. The only advertising I've seen in the last couple of years on Windows 11 is Outlook ads because I don't have a Microsoft 365 subscription. That said, it took me only a couple days to get used to ignoring those ads. I would prefer they weren't there but it's not a big deal.
    • Petty nerd sums up many peoples dislike for things. i.e. Windows 11
    • I've been using Windows 11 since the day it was released. No complaints whatsoever from me but then again, I always like trying new things. It's been ROCK SOLID running my Dell XPS 8940 desktop.
    • So many things to unpack here I don't even know where to begin...
    • Cjam 1.9.9.0 by Razvan Serea Cjam is a lightweight and fast MP3 editor for Windows that lets you cut, join, and edit MP3 files without re-encoding. This means your audio quality remains untouched, and edits happen instantly. Cjam is ideal for quick, lossless edits—whether you're trimming music, combining tracks, or preparing audio for learning tools or podcasts. It features batch processing, scripting support, cue and playlist file handling, and a simple interface. Cjam is perfect for anyone who needs efficient MP3 editing without the complexity of full audio suites. Cjam requires a PC running Windows 10 or later and Microsoft .NET 6.0 or later. Key features for Cjam: No Re-encoding: Edit MP3 files without losing quality. Cut and Join MP3: Easily cut, trim, and combine MP3 tracks. Batch Processing: Edit multiple files at once for faster workflows. Scriptable Interface: Automate tasks with a custom command language. Cue and Playlist Support: Handle CUE and playlist files for seamless audio management. Fast and Lightweight: Quick processing with minimal system resources. Lossless Audio Editing: Ensure your edits don't affect audio quality. Simple User Interface: Clean, intuitive design for easy navigation. File Format Support: Works with MP3, Cjam-specific file formats (CJAMC, CJAMJ, CJAM). Cjam 1.9.9.0 fixes: Fixed a bug related to playback display on the main screen Download: Cjam 1.9.9.0 | 1.3 MB (Freeware) Links: Cjam Home Page | Cjam Manual | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Explorer
      Legend20 went up a rank
      Explorer
    • One Month Later
      jezzzy earned a badge
      One Month Later
    • First Post
      CSpera earned a badge
      First Post
    • One Month Later
      MIR JOHNNY BLAZE earned a badge
      One Month Later
    • Apprentice
      Wireless wookie went up a rank
      Apprentice
  • Popular Contributors

    1. 1
      +primortal
      635
    2. 2
      ATLien_0
      281
    3. 3
      +FloatingFatMan
      182
    4. 4
      Michael Scrip
      151
    5. 5
      Steven P.
      117
  • Tell a friend

    Love Neowin? Tell a friend!