Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Autorun on USB drives

03 Aug 2009   #21
fakeasdf

Win 7 Pro x64 x 3, Win 7 Pro x86, Ubuntu 9.04
 
 

Quote   Quote: Originally Posted by hardy View Post
This is very old style, but works. This way a mounted Truecrypt volume is just a doubleclick further than with Autoplay.

Create run.bat in the USB stick root and edit this one line into it:

Code:
open=TrueCrypt\TrueCrypt.exe /q background /m rm /v "Data.tc"
This line expects that Truecrypt has been installed (as with the Traveler wizard) in the root in a 'Truecrypt' folder. Rename Data.tc according to the name of your encrypted volume.

Now as Windows 7 opens the 'Open to view files' option, choose that, then double click run.bat to open the Truecrypt password screen.
Even though I don't actually use this software, that's a good point. You'd probably want to create a batch file for unmounting the drive as well, so you can avoid opening up the program etc..


My System SpecsSystem Spec
.
23 Nov 2009   #22
hsrstud

Windows 7
 
 

Can the above autorunner.exe file be made to run on an x64 machine? I tried the above program, but it didn't seem to work when I inserted my USB drive. Only autoplay showed.
My System SpecsSystem Spec
23 Nov 2009   #23
fakeasdf

Win 7 Pro x64 x 3, Win 7 Pro x86, Ubuntu 9.04
 
 

Quote   Quote: Originally Posted by hsrstud View Post
Can the above autorunner.exe file be made to run on an x64 machine? I tried the above program, but it didn't seem to work when I inserted my USB drive. Only autoplay showed.

It's built to run as x64 when in x64 environment, and x86 when in x86 environment. I just tested it on my x64 machine and it popped up the messagebox asking if I wanted to run the thing. It searches for autorun.inf in the usb drive and then asks. Post the contents of your autorun.inf file and I'll look into it...
My System SpecsSystem Spec
.

23 Nov 2009   #24
hsrstud

Windows 7
 
 

Thanks for looking into this for me! Here are the contents of my autorun.inf file:

[autorun]
label=TrueCrypt Traveler Disk
icon=TrueCrypt\TrueCrypt.exe
action=Mount TrueCrypt volume
open=TrueCrypt\TrueCrypt.exe /q background /e /c y /m rm /v "Truecrypt\Volume.tc"
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
My System SpecsSystem Spec
23 Nov 2009   #25
fakeasdf

Win 7 Pro x64 x 3, Win 7 Pro x86, Ubuntu 9.04
 
 

Quote   Quote: Originally Posted by hsrstud View Post
Thanks for looking into this for me! Here are the contents of my autorun.inf file:

[autorun]
label=TrueCrypt Traveler Disk
icon=TrueCrypt\TrueCrypt.exe
action=Mount TrueCrypt volume
open=TrueCrypt\TrueCrypt.exe /q background /e /c y /m rm /v "Truecrypt\Volume.tc"
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 just pasted that into my autorun.inf and it popped up the pop up, are you looking for the right thing? And I'm running 7 x64 Professional. Here's a pic of what it does...


Attached Images
Autorun on USB drives-autorunner.png 
My System SpecsSystem Spec
24 Nov 2009   #26
hsrstud

Windows 7
 
 

Unfortunately, I don't receive that window when I plug my USB drive into my computer. I only receive the autoplay window. I'm also running Windows 7 Pro.
My System SpecsSystem Spec
24 Nov 2009   #27
hsrstud

Windows 7
 
 

I just want to make sure... the only thing I should need is the Autorunner.exe file that you attached to your 07-11-2009 post, right?
My System SpecsSystem Spec
24 Nov 2009   #28
fakeasdf

Win 7 Pro x64 x 3, Win 7 Pro x86, Ubuntu 9.04
 
 

Yes... Is this a thumb drive, or an actual external USB drive... There's a possibility it show's up differently and my thing isn't checking it...

I'm specifically checking
if (drive.DriveType == DriveType.Removable)
which should include an external hard drive, but I'm not sure...
My System SpecsSystem Spec
24 Nov 2009   #29
hsrstud

Windows 7
 
 

Maybe this is the problem. I'm using a portable 30GB 2.5" mobile hard drive that I connect to my computer via USB.
My System SpecsSystem Spec
24 Nov 2009   #30
fakeasdf

Win 7 Pro x64 x 3, Win 7 Pro x86, Ubuntu 9.04
 
 

Quote   Quote: Originally Posted by hsrstud View Post
Maybe this is the problem. I'm using a portable 30GB 2.5" mobile hard drive that I connect to my computer via USB.

I'll have to test it at home, I don't have an external with me at work... Kind of weird, I might be able to grab someone else' external...
My System SpecsSystem Spec
Reply

 Autorun on USB drives




Thread Tools




Similar help and support threads
Thread Forum
USB autorun
when my USB is plunged or is opened in the file explorer i want a bat file run how would i do this
General Discussion
DVD/CD won't autorun
I'm pretty sure I have set all the options so that the disks _ought_ to autorun but they won't. I have to go into Powerdesk (File Manager) and select a vob file. I' installed a codec package but that made no difference. I have had problems with this drive, Samsung TSST CDDVDW 288BB, in fact...
Hardware & Devices
No Autorun?
OK, so I'm not sure why this is happening... For some reason it seems that autorun prompts are entirely disabled on my laptop, I'll put in a CD and nothing happens, I plug in a hard drive and nothing happens, etc. I don't get the options window like I did before I did a clean install. I even...
General Discussion
How to Autorun USB on Win 7
Hi, I want to make a USB flash drive auto run a website link in Windows 7. I know the auto run function has been removed in Win 7, but can I at least make a pop up window appear whenever a USB flash drive is inserted in the PC and have the user the option to click and open the link??? ...
Software
USB autorun in W7
Ok, I know this is a sore subject, but are there any work-a-rounds to get handy programs like PortableApps to at least be an option to run when you plug it in? It kind of defeats the purpose of the whole thing. I'm not plugging in rogue USB sticks from strangers in dark alleys, just my own USB...
General Discussion
Autorun.dll
Is missing or corrupted.. anyone have this prob..? I have dl'd and burned the iso 2x and have the same prob. let me say that in order to burn iso..i have just renamed the longnamed file to (the longname).iso i have been dl'ing it with ff and it is adding a ,dlm to the file and i have just been...
Installation & Setup


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 20:11.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App