Add to autoplay

Discussion in 'Software' started by PrivatePile, Apr 30, 2012.

  1. PrivatePile

    PrivatePile Private E-2

    Simple question I think. Is it possible to add to the Autoplay menu when you insert a flashdrive? I followed this tutorial HERE and I'd like to have the MountTC.bat as an option in AutoPlay, just to save myself the 4-5 clicks of going into the drive. Is this possible?

    For those that dont want to read the tutorial, basically you encrypt a flash drive with TrueCrypt, and create a batch file to mount it. I'd like to have the bat file available on the autoplay menu.
     
  2. PC-XT

    PC-XT Master Sergeant

    If you don't already have an Autorun.inf file in the root directory of the drive, create one, something like this:
    Code:
    [autorun] 
    icon=myicon.ico
    label=My Flashdrive
    
    You could use the line
    Code:
    open=MountTC.bat
    to make it run automatically, but if you want a new menu item, here's how.

    First, add this line:
    Code:
    shell\MountTC\command=MountTC.bat
    That will create a command named MountTC. If you want to set the name, add the line
    Code:
    shell\MountTC=&Mount TC
    Place the ampersand (&) before the letter you want to be used as the hotkey.

    Lastly, if you want this to be the default command, that is, the one that runs when you double-click it, add this line:
    Code:
    shell=MountTC
    This is how it would look in the file, if you use all the options I gave above:
    Code:
    [autorun] 
    icon=myicon.ico
    label=My Flashdrive
    shell\MountTC\command=MountTC.bat
    shell\MountTC=Mount &TC
    shell=MountTC
    
    See the following links for more info on these commands:
    http://en.wikipedia.org/wiki/Autorun.inf
    http://msdn.microsoft.com/en-us/library/cc144200(VS.85).aspx
     
  3. PrivatePile

    PrivatePile Private E-2

    Am I missing something? Below is the code that was created by Truecrypt originally...

    Code:
    [autorun]
    label=TrueCrypt Traveler Disk
    icon=TrueCrypt\TrueCrypt.exe
    action=Mount TrueCrypt volume
    open=TrueCrypt\TrueCrypt.exe /q background /e /m rm /v "Personal"
    shell\start=Start TrueCrypt Background Task
    shell\start\command=TrueCrypt\TrueCrypt.exe
    shell\dismount=Dismount all TrueCrypt volumes
    shell\dismount\command=TrueCrypt\TrueCrypt.exe /q /d
    I changed that to the below...

    Code:
    [autorun]
    icon=TrueCrypt\TrueCrypt.exe
    label=TrueCrypt Traveler Disk
    shell\MountTC\command=MountTC.bat
    shell\MountTC=&Mount TC
    shell=MountTC
    Yet I still do not get anything other than Open File and ReadyBoost in the AutoPlay. I also noticed that I do not get the truecrypt image on my drive in windows explorer. What am I missing? I'm running Windows 7 Pro x64 if that matters.
     
  4. PC-XT

    PC-XT Master Sergeant

    The original file is the one you want to use. It already had the menu options in it. The problem is that Windows 7 changed the behavior of AutoRun for USB drives (that don't emulate an optical drive, like a U3 drive does.) Any line that doesn't begin with icon or label is ignored.

    You may be able to re-enable autorun, but I don't know how to do that in Windows 7. You might want to ask in the software forum, though they will probably warn you it's a security vulnerability.

    http://blogs.technet.com/b/srd/archive/2009/04/28/autorun-changes-in-windows-7.aspx
    http://blogs.msdn.com/b/e7/archive/2009/04/27/improvements-to-autoplay.aspx
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds