Solved

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

Posted on 2007-04-09
3
4,058 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
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…

828 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