Solved

autorun.inf context menus missing from a USB flash drive after windows restart.

Posted on 2007-04-09
3
4,050 Views
Last Modified: 2013-11-14
I have USB flash drive with autorun.inf file in the root folder. The autorun.inf contains some custom contex menu items. Problem is, when I restart my PC with my USB flash connected, my menus are gone. I need to remove it and insert it again before any of the custom context menus are present. Why is that? How can I solve it? My OS is Windows XP Pro SP2.

This is my autorun.inf

[autorun]
label=TrueCrypt Traveller Disk
icon=TrueCrypt\TrueCrypt.exe
action=Mount TrueCrypt volume
open=TrueCrypt\TrueCrypt.exe /q background /lZ /m rm
shell\start=Start TrueCrypt
shell\start\command=TrueCrypt\TrueCrypt.exe
shell\autostart=Automount TrueCrypt volume
shell\autostart\command=TrueCrypt\TrueCrypt.exe /q background /lZ /m rm
shell\dismount=Dismount all TrueCrypt volumes
shell\dismount\command=TrueCrypt\TrueCrypt.exe /q /d
0
Comment
Question by:avok
  • 2
3 Comments
 
LVL 7

Expert Comment

by:avatar-e
ID: 18878666
This appear to be a Windows XP problem. Sometimes happen with cd-roms too, maybe you can do a script to eject and redetect pendrive after booting
0
 

Author Comment

by:avok
ID: 18878741
That could do the trick. Maybe some kind of refresh or reload of the USB drive. Problem is, I have no idea how to write something like this.
0
 
LVL 7

Accepted Solution

by:
avatar-e earned 250 total points
ID: 18880262
I found a solution.

First download and install devcon from MS site:
http://support.microsoft.com/kb/311272

Then create a startup console program (in notepad) to remove and restore the pendrive. You need know the hardware id of your device, go to device manager:
Start / Run: devmgmt.msc

Then go to properties of your pendrive, in the details tab there is a "Hardware ID" section with some IDs like this:
USBSTOR\DiskKingstonDataTraveler_2.01.04
USBSTOR\DiskKingstonDataTraveler_2.0
USBSTOR\DiskKingston
USBSTOR\KingstonDataTraveler_2.01
KingstonDataTraveler_2.01
USBSTOR\GenDisk
GenDisk

Now, you can use any of this identificators in the CMD, for example:
devcon disable kingston*
devcon enable kingston*

That script will remove and reinsert the pendrive and your autorun menu will be there again at Windows startup.

PD: The cmd can be redirected with a shortcut with "Minimize", so you dont will see the black blinking screen of the windows console.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In this article, I provide some information on storage disks which go into calculations that will help you figure out how much Input/output Operations Per Second (IOPS) your disk subsystem can deliver. To effectively size & tune up applications l…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now