Autorun scripts?

Buddha16Buddha16 Austin, Tx Member
edited December 2005 in Science & Tech
Anyone know how to write autorun scripts?

Comments

  • ShortyShorty Manchester, UK Icrontian
    edited November 2005
    Autorun for....? CD's??? login scripts...?
  • Buddha16Buddha16 Austin, Tx Member
    edited November 2005
    yea for cd's

    I don't know if it can be done. But i need a script that will copy the files on the cd (when i put it in) to a folder on the hd and overwrite older files. I appreciate any help. TIA. :confused::D
  • ShortyShorty Manchester, UK Icrontian
    edited November 2005
    http://www.highdesertsoftware.com/autorun.html

    That will create the autorun.inf files for ya. The rest is just a simple .bat file that will copy & overwrite files ;)
  • Buddha16Buddha16 Austin, Tx Member
    edited November 2005
    what program do i tell it to run, it says i must select an exe.? :confused:
  • profdlpprofdlp The Holy City Of Westlake, Ohio
    edited November 2005
    A more specific description of what you are trying to do would be helpful. Do you want to autoplay music? Create a slideshow? Launch a program? Or...? :)
  • Buddha16Buddha16 Austin, Tx Member
    edited December 2005
    I want to make a file cd. So when i put the cd in it automatically writes the files to the hd and replaces old files. and thats it. :confused:
  • GrayFoxGrayFox /dev/urandom Member
    edited December 2005
    Buddha16 wrote:
    I want to make a file cd. So when i put the cd in it automatically writes the files to the hd and replaces old files. and thats it. :confused:
    Cds are read only ... and you need a batch on a floppy for that.
  • ThraxThrax 🐌 Austin, TX Icrontian
    edited December 2005
    Of course CDs are read only, but he wants to copy files TO the hard drive, overwriting old files. Read the post.
  • Buddha16Buddha16 Austin, Tx Member
    edited December 2005
    right so a script that will just copy the files to a directory and overwrite old files....thanks to all by the way for your help. :D
  • Buddha16Buddha16 Austin, Tx Member
    edited December 2005
    any suggestions? :confused:
  • deicistdeicist Manchester, UK
    edited December 2005
    the autorun.inf doesn't need to point to a .exe, it can point to a .bat

    a .bat file is a batch file, a simple text file that contains a series of commands to be executed. The command you want is 'copy' as in:

    "copy d:\myfile.txt c:\myfolder\myfile.txt"

    this will copy a file called myfile.txt from the d: drive (your CD drive hopefully) to a folder called myfolder on your c:\ drive. You can add the /y switch to the end of that command to make it not ask you about overwriting files. ie:

    "copy d:\myfile.txt c:\myfolder\myfile.txt /y"

    or, if you have lots of files you want to copy try this

    "copy d:\*.* c:\myfolder"

    This will copy any files (*.* uses wildcard characters to select all files) in the root (lowest level) of the D: drive into the myfolder folder on the c drive.


    so, create a simple text file with a series of those copy commands in it, call it 'runme.bat' (or something.bat) and point your autorun.inf at it.

    Hope that helps.


    edit: here's a more specific example. lets say we have a folder on our cd called 'files' that has a number of files in it. we want to insert that cd and automatically copy those files to a folder on our c: drive called 'copied_files'. now, first we need to create our batch file. create a new text file and put the following line into it:

    copy d:\files\*.* c:\copied_files /y

    now, save that file and name it 'runme.bat'.

    Now we need to create our autorun.inf. create another new text file and put these lines into it:

    [autorun]
    open=runme.bat

    save that file as 'autorun.inf'

    and that's basically all you need to do. make sure those 2 files are in the root of your CD and your files are in a folder on the CD called 'files' and you should be set to go. This assumes your cd drive is D: and your hard drive is C: but you can change those as applicable.
  • Buddha16Buddha16 Austin, Tx Member
    edited December 2005
    Thats exactly what i was needing, thanks. It seems pretty simple too. Tried it and i works like a champ. You think its possible to work backwards as well. ie... from hd to zip disk, if i tell the .bat file to copy off the hd to the disk? :thumbsup:
Sign In or Register to comment.