Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Autorun

  • 21-05-2006 10:14pm
    #1
    Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭


    Hi Guys,

    Does anyone know how to setup a thumb drive to automatically execute a program when its plugged in like a CD. I know it can be done but Im wondering if anyone out there has done it and if so do they have a link to the tutorial they used etc.

    Dave


Comments

  • Registered Users, Registered Users 2 Posts: 919 ✭✭✭timeout


    http://www.phdcc.com/shellrun/autorun.htm

    The above is for a cd but might apply to a pen drive also.


  • Registered Users, Registered Users 2 Posts: 8,408 ✭✭✭Gadgetman496


    Dave,
    You can download an App that will make your pen drive bootable from
    http://h18000.www1.hp.com/support/files/serveroptions/us/download/23839.html

    Then follow this link to learn more.
    http://www.weethet.nl/english/hardware_bootfromusbstick.php

    Hope this helps a little :)

    "Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid."



  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭PDD


    Cheers Gadgetman,

    But thats to make the ThumbDrive bootable, I want to make it autorun like a CD whereby I plug in the ThumbDrive and it runs a particular script etc.

    Dave


  • Registered Users, Registered Users 2 Posts: 8,408 ✭✭✭Gadgetman496


    Hi Dave,
    I'm not 100% sure but I would imagine that you could do this easily using a "Batch" file.
    In the old days of DOS, windows used to take it's instructions at startup from a file called "Autoexec.bat". Even in Windows XP that file still exists, but may be hidden.
    Anyway, when you make your pen drive bootable, check to see if it has a file called "Autoexec.bat" on it. If it has, all you would need to do is open it with your editor (Notepad) & insert a new line into it that would instruct it to run a particular executable file. For example, let's say your pen drive was drive 'G' & you wanted to run the windows calculator at startup? you would insert the following line into the autoexec.bat file.

    C:\WINDOWS\system32\calc.exe

    Then when the autoexec.bat file runs at startup it would automatically run & open the windows calculator.

    Now, if there is no autoexec.bat file on the pendrive? you can create one yourself. Just open notepad, type the command you want to execute & save the file as "Autoexec.bat" to your pen drive.

    There is one more thing to bare in mind. Not all scripts or exe files can be run from the pen drive, so you could also do something like this.....

    1. Copy whatever it is you want to run to a directory on the pen drive.
    2. Create (or use existing) autoexec.bat file
    3. Insert the following lines into the batch file

    @echo off (This will just hide the instructions on the screen as they're run)
    cls (This will just clear anything that might be on the screen)
    C: (Changes from the pen drive to the PC's hard drive)
    md dirname (Makes a directory on the PC with whatever name you decide)
    cd dirname (Changes the directory to the new one just created)
    copy g:\dirname*.* c: (Copies everything needed from the pen drive directory to the new directory on the PC's hard drive)
    Name of file you want to run (Runs the file\script you have chosen from the PC & not the pen drive)
    del install.bat (Deletes the batch file from the PC's hard drive, but not the pen drive)

    I hope some of this will help sort you out. Maybe other users might be able to explain this to you in a better way? but i think it is pointing you in the right direction. Either way, I hope you can get it sorted. :)

    "Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid."



  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Bear in mind that if your USB ports will allow autorun for you, they'll allow autorun for everyone... adam


  • Advertisement
  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,385 Mod ✭✭✭✭Capt'n Midnight


    Ken Shabby wrote:
    Bear in mind that if your USB ports will allow autorun for you, they'll allow autorun for everyone... adam
    As a variation on a theme

    I just love the way most versions of windows will try to install and activate a USB wifi adaptor - I mean why does server 2003 start the wireless service by default ??


  • Posts: 0 [Deleted User]


    PDD wrote:
    Hi Guys,

    Does anyone know how to setup a thumb drive to automatically execute a program when its plugged in like a CD. I know it can be done but Im wondering if anyone out there has done it and if so do they have a link to the tutorial they used etc.

    Dave
    Make a plain text file in the root of the device called "autorun.inf" and enter the following into it:

    [Autorun]
    open=<app name>

    For example if you want to run test.exe enter "open=test.exe" as the second line.

    I think XP will prompt you to "Run the specified program on this device" along with the usual pics, music and video links but I think you can set it to remember that.


Advertisement