Solved

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

Posted on 2007-04-09
3
4,065 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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…

695 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