Solved

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

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

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 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 …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

816 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

8 Experts available now in Live!

Get 1:1 Help Now