Solved

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

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

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Question has a verified solution.

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

This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…

861 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

22 Experts available now in Live!

Get 1:1 Help Now