usb flash autorun files
Results 1 to 6 of 6

Thread: usb flash autorun files

  1. #1
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325

    usb flash autorun files

    I often have to copy large files over our WAN that can take a really long time.

    These files are more updates than anything else... but there are multiple files.

    Right now, I have a bunch of scripts that map the drives, copy over the necessary files to the correct directories and all is well. I schedule the scripts to run at different intervals. I have about a dozen servers that need to be updated in this manner. Sometimes the script fails. It fails mostly when the files that are being copied are over a couple hundred MB.

    I was thinking about other media that I might want to use... possibly USB flash drives.

    The flash drive will automaticlly mount but I am unable to get it to autolaunch the scripts.

    I've tried the autorun.inf file but that doesn't seem to work.

    What I want it to do...

    Insert the flash drive, the autorun.inf will launch the scripts.

    After the scripts have been completed. I want to launch another script (called by the scripts that were just run) that will basically do a tree on a specific directory, then a dir with some switches to output the info I want and store it on the flash drive. While I'm at it, I'm going to run a couple of audit programs that will run in "silent" mode so there is no user interaction required. The report will also be stored on the flash drive. After I get the flash drive back the following day, I'll have all the info I need.

    I have no problem writing the scripts... but how can I get the flash to mount and autolaunch the scripts with no user interaction?

    I was thinking about scripting them and putting them on a CD, so I can send the CD to a remote site and have a trusted person put the CD in and the batch file would execute automatically updating the necessary files. But I can't get reports to be stored on the media because it is read only... so CDs are out.

    If I really had to, I can use the CDs, run the scripts and the remotely grab the reports over the WAN. I was just thinking since I have all these flash drives... I might as well use them.

    While I'm thinking about this... is there any way to close a file while it is in use?
    Sometimes the scripts fail because someone forgot to close out a program that is running from the server. Normally this is not a problem because of logon time restrictions and the server will kick the user off and kill files that are in use... but some people at the remote sites need 24/7 access because of their job requirements and work all hours of the day/night.

    I know I can use mmc to connect to the server and close the open files... but is there a way to do that from within a script? I've been using batch files because they are the easiest and can do exactly what I want them to do.
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  2. #2
    Senior Member nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,190
    phish~

    AFAIK you cannot get a USB device to autorun. When you add a USB device it is detected as an additional bit of hardware (mounted)............it does not automatically open it like a CD or DVD.

    The problem is much the same as with the 3.5" floppy drive that will not support autorun either.

    I believe that it can be done with LS120 and zip drives, as these are "floptical" devices? but I must admit that I have never tried it

    I would be very interested to know if there was a way.....

    Cheers

    EDIT: Would it be possible to and something to the logon script that would open the USB drive and run the update? Otherwise what about remote logon/support software? You would have to rely on someone physically attaching the USB drive, but manage it remotely/automatically?

    OK a gross "hack" I know, but the best I can think of at the moment

  3. #3
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    nihil: thanks, thats what I though. I see some places that say it can be done and others that say it can't. aparently, it can be done with certain flash drives... but if its just flash... then why not all flash drives?

    the way I have it going now will work... I had an update over the weekend and everything was sucessful. I was just trying to dream up ways to keep the bandwidth usage and time down to a minimum... but hey... they are leased lines and not in use on the weekend... so I suppose I might as well use them anyway. We still get charged the same if we use them or not.

    Maybe I'll just script up something to make sure that the files were indeed sucessful... and if not, then run the update again.

    I'll just need to figure out how to "close files" that are in use via script.
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  4. #4
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    I've done some more searching. Seems that they only way you can get a usb flash drive to automatically execute an autorun.inf file is to use a utility that runs in the background. These utilities are device specific and the devices I have don't have the utility.

    Go figure...

    Oh well, the thought was nice... but I'll stick to my scripts over the network until I can find something that works better. They work 98% of the time and I don't have to rely on anyone but myself... and the carriers.
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

  5. #5
    AO French Antique News Whore
    Join Date
    Aug 2001
    Posts
    2,126
    I found something while I was looking into TweakIT. An option to enable autoplay for removable drive (Off)

    I search on google on "enable autoplay for removable drive" return a few cool stuff. Maybe you can try that.
    -Simon \"SDK\"

  6. #6
    Banned
    Join Date
    Jun 2003
    Posts
    1,302
    Hmm... .Nihil are you sure. I am pretty sure that a USB thumb drive can be set up to be autorun.

    Now this is on my *nix box, but when I set it up to usr my USB thumb drive I had to set it up to auto-detect and autorun and auto-mount.

    Now on Windows, I have no ****ing clue.

    I have a script or something, somewhere.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •