Top Banner
Daily Cup of Tech Bean There, Done Tech 28 Home | | Login | Contact USB Drive AutoRun.inf Tweaking Trackback or ShareThis The autorun.inf file is the key to getting your USB drive (or CD-ROM drive, for that matter) to perform certain actions automatically and customize it’s look in My Computer . The purpose of this article is to shed some light on how this can be done. Autorun.inf Structure The autorun.inf file is a simple text file that can be opened up in any text editor (e.g. notepad). It always starts with a section header of: [autorun] Below this header is a list of different options. Each of these options is in the following format: option=value where option is the option that you want to set and value is the value that you are setting for that option. So, if you had an option foo and you wanted to be set to bar, then you would enter: foo=bar (Do not use foo=bar in your autorun.inf file as it is only an example, not a real option setting.) That is all there really is to understand about the structure of an autorun.inf file. On to doing some actual cool stuff with it! Setting a Custom Icon To create a custom icon for your USB drive, use the icon option. Set it to the name of the icon file. Note: Since drive letters can change for USB drives, the file path is relative to the root of the drive. This means that if your USB drive is presently mounted on U: and your icon is located at U:\Icons\MyIcon.ico, then you would enter \Icons\MyIcon.ico for the value of this option. For example, if you had an icon on the root of the USB drive called coffeecup.ico and you wanted this to be the icon that showed up for the USB drive, you would enter: icon=coffeecup.ico You are not limited to .ico files. If, for example, you have an executable with a nice icon, you can specify it as the icon file. For example: icon=DCoTopen.exe This is valid as long as DCoTopen.exe is available on the root of the USB drive. Donate Translate Recent posts Random Share USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/ 1 of 49 2/27/2012 4:14 PM
49
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: USB Drive AutoRun.inf Tweaking

Daily Cup of TechBean There, Done Tech

28

Home|

|Login|Contact

USB Drive AutoRun.infTweaking

Trackback or ShareThis

The autorun.inf file is the key togetting your USB drive (or CD-ROMdrive, for that matter) to performcertain actions automatically andcustomize it’s look in My Computer.The purpose of this article is to shed some light on how this can be done.

Autorun.inf Structure

The autorun.inf file is a simple text file that can be opened up in any text editor (e.g. notepad). It always starts with a sectionheader of:

[autorun]

Below this header is a list of different options. Each of these options is in the following format:

option=value

where

option is the option that you want to set and value is the value that you are setting for that option. So, if you had an optionfoo and you wanted to be set to bar, then you would enter:

foo=bar

(Do not use foo=bar in your autorun.inf file as it is only an example, not a real option setting.)

That is all there really is to understand about the structure of an autorun.inf file. On to doing some actual cool stuff with it!

Setting a Custom Icon

To create a custom icon for your USB drive, use the icon option. Set it to the name of the icon file.

Note: Since drive letters can change for USB drives, the file path is relative to the root of the drive. This meansthat if your USB drive is presently mounted on U: and your icon is located at U:\Icons\MyIcon.ico, then youwould enter \Icons\MyIcon.ico for the value of this option.

For example, if you had an icon on the root of the USB drive called coffeecup.ico and you wanted this to be the icon thatshowed up for the USB drive, you would enter:

icon=coffeecup.ico

You are not limited to .ico files. If, for example, you have an executable with a nice icon, you can specify it as the icon file.For example:

icon=DCoTopen.exe

This is valid as long as DCoTopen.exe is available on the root of the USB drive.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

1 of 49 2/27/2012 4:14 PM

Page 2: USB Drive AutoRun.inf Tweaking

index number after the file name. For example:

icon=iconlib.dll,2

This will use the second icon in the iconlib.dll file.

Naming Your USB Drive

If you would like your USB drive to display a specific name othr than the drive label created when it is formatted, use thelabel option. For example, if I wanted to call my drive DCoT Drive, I would add this to my autorun.inf file:

label=DCoT Drive

Now, when you look at your USB drive in My Computer, it will say DCoT Drive by the drive letter.

Setting AutoPlay Options

AutoPlay is a relatively new function of Windows XP. It allows you to set up what file is run when the USB drive is pluggedinto the computer and the message that you are prompted with. There are two options that work in conjunction withAutoPlay. The first is open. It specifies the program that you can run automatically with AutoPlay. So, if we wanted to run aprogram called DCoTopen.exe, you would add the this to your autorun.inf file:

open=DCoTopen.exe

The second option that we add is the message the user is prompted with. To set this, we use the action option. If we wantthe message to say DCoT Open Program, add the following to autorun.inf:

action=DCoT Open Program

Once you have added this information, AutoPlay should look something like this:

Adding Context Menu Items

There are certain basic options such as Open and Explore that are available when you right click on a USB drive. But,wouldn’t it be cool to add your own? You can using a couple of lines in the autorun.inf file.

The first thing that we need to do is create an action, give it a name, and a message. We do all of this using the shell\verboption. For example, let’s say that we would like to create an action called lost. It does not matter what the actin is called. Itcan be anything you want. We would also like to show the message Help! I’m Lost! in the context menu. We would simplyadd this line to autorun.inf:

shell\lost=Help! I'm Lost!

This will display DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

2 of 49 2/27/2012 4:14 PM

Page 3: USB Drive AutoRun.inf Tweaking

click on it. Tell the system by using shell\verb\command option. In our example, we want to run the Lost.exe application.Adding this line will do the trick:

shell\lost\command=Lost.exe

You can add as many of these line pairs as you want to make the context menu as custom as you want.

Changing Default Action

When you double click on your USB drive, by default it will open up the drive so that you can browse through the files.Often, it is advantageous to perform some other action when the user double clicks the USB drive icon. You do this with theshell option. If we wanted to run the Lost.exe program from the previous section automatically when we double clicked onthe USB drive, we would add this line:

shell=lost

because lost is the name of the action that was specified in the earlier lines.

Viewing a File

If you wanted to view a file on your USB drive in the default application instead of running a program on the drive, you cansubstitute the open option for the shellexecute option. For example, if you wanted to open up a website called, oh, I don’tknow, say http://www.DailyCupOfTech.com in the default web browser, you could user the following:

shellexecute=http://www.DailyCupOfTech.com

This will work for any file. This is the equivalent of using Start - Run… and then typing in a file name and clicking OK.

School’s Out, Time To Play!

That is about all there is to customizing the autorun.ing file. Now that you know what you are doing, it’s time to startplaying! I have created the Autorun Dabbler’s Toolkit that you can play with.

Download the zip file and extract the contents to the root of an empty USB drive. You can now edit the autorun.inf and get itto do different things. Have fun!

Trackback link - http://www.dailycupoftech.com/usb-drive-autoruninf-tweaking/trackback/

242 Responses to “USB Drive AutoRun.inf Tweaking”

Mystech Says:September 27th, 2006 at 9:41 am

The link to “Autorun Dabbler’s Toolkit” seems to be broken. Any chance of a fix? I’d like to give this a try. Thanks!

1.

Tim Fehlman Says:September 27th, 2006 at 9:57 am

Thanks for the heads up. I (wrongly) assumed that the upload feature in my blog software actually worked! The link isup and running again. Sorry for any inconvenience this may have posed to anyone.

2.

Mystech Says:September 27th, 2006 at 10:48 am

Thanks, Tim. I just gave it a spin and it works like a charm! I can think of all sorts of great uses for this trick… like allthose pesky thumbdrive applications I have laying around. I even tried it on my iPod in data mode (since I use it toshuttle lots of files around on occasion) and it works there as well. Woot!

3.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

3 of 49 2/27/2012 4:14 PM

Page 4: USB Drive AutoRun.inf Tweaking

September 27th, 2006 at 11:16 am

Cool! I love it when people can get something useful out of my efforts! Keep us posted (no pun intended ) on yourautorun.inf adventures.

Tim

Eric Says:October 24th, 2006 at 7:16 am

Thanks for the guide and demo! At this point in my autorun.inf adventures I’m putting a number of portable apps onmy flash drive and trying to use autorun.inf to create the AutoPlay list with all of the apps on it. I can’t seem to get itto display more than one, and if I specify a drive icon it overrides the icon for the one program that shows up on thelist. Anyone have some more tips?

5.

Tim Fehlman Says:October 24th, 2006 at 7:53 am

Eric,If I understand how the autorun.inf file works, you can only set one item in the AutoPlay box.

There are two options that I can think of:

Use AutoPlay to start an application like PStart1.Ignore AutoPlay and user the autorun.inf file to create a launch list from the context menu2.

Hopefully this will point you in the right direction.

Tim

6.

Eric Says:October 24th, 2006 at 8:28 am

Tim,Thanks for the quick response, your suggestions have definitely pointed me in the right direction. It’s curious how itseems that the icon you use for the drive is the one it will use for the one program on the list; I noticed that yourDCoTopen.exe program has a bean icon rather than the coffee cup it shows.

Thanks for the help and the valuable article!

Eric

7.

Russell Says:October 24th, 2006 at 3:57 pm

Tim,

Thanks for the AutoRun info. I downloaded the toolkit and formatted a new USB key to try it out. I put the toolkitcontents in the root of the key and plugged it in. For some reason, none of the autorun features are working. The label,the icon, the open… none of it. Windows Explorer just lists the key as another drive (F:) in the list.

Do you know if there’s something to turn on/off autorun?

Thanks-Russell

8.

Russell Says:October 25th, 2006 at 9:40 am

Hi again Tim,

Nevermind… I rebooted my system and tried it again. This time it works!

Fixes problems with Windows every time!!

-Russell

9.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

4 of 49 2/27/2012 4:14 PM

Page 5: USB Drive AutoRun.inf Tweaking

Alfonso Says:October 26th, 2006 at 12:08 pm

Great advice. I was looking for something like this since i started using my USB drive as a portable workspace.How can I open a file through a program on the drive with the context menu? (i mean, i have a html file i want to runafter the Help!.exe and Pstart. can I have it run through the portable firefox on my drive?)thanks again!

10.

Rob Roach Says:November 12th, 2006 at 12:20 pm

Thanks for all the tips. I am desperate to know your backup script so I can auto-backup my USB drive. I am an absentminded professor that needs all the help he can get to back up regularly. Any chance you could share the script?

Thanks,

Rob

11.

Vini Says:November 16th, 2006 at 10:28 am

Hi, Alfonso, To your query , I think it will be difficulty to open it from portable firefox(I am not sure of), But if youknow a little of flash it becomes very simple. Create a simple page in flash with all the text and image you need. Link atext or image to the folder you wanna open . Now, when you click the link,exactly the same folder or contents aredisplayed. But make sure the link are CORRECT!TIM .. correct me if Iam wrong.(Hey the True and False for the title dosent work)

Until then, have a blast & Keep up the USB

12.

Tim Fehlman Says:November 16th, 2006 at 3:04 pm

Sorry for taking so long to get back to you guys. I had you on my list of replies and it got missed.

Alfonso,What I would suggest is you write a little AutoIt app to launch them both and then configure the Autorun.ing file tolaunch the app.

Rob Roach,I am actually in the process of releasing a complete backup USB solution for the DCoT readers. Until then, might Ipoint you at robocopy?

Vini,Thanks for helping out Alfonso. It appears that there are a couple of bugs in the script I wrote. I will be looking at it inthe near future so that it works a bit better.

Tim

13.

nilesh Says:December 6th, 2006 at 8:15 pm

Thanks very much for your help

14.

iorien Says:January 9th, 2007 at 2:03 am

Naming Your USB Drive and Setting AutoPlay Options work’s in windows 2000 S.O.???

thanks

15.

Tim Fehlman Says:January 9th, 2007 at 6:40 am

iorien,

16.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

5 of 49 2/27/2012 4:14 PM

Page 6: USB Drive AutoRun.inf Tweaking

Tim

Jeremiah Says:January 9th, 2007 at 5:16 pm

How can I make it so it does not give an option for what program to use when the autorun starts? I don’t wantsomeone to be able to hot cancel. I just want to have someone insert the USB drive and have it start playing.

17.

Mike Hughes Says:January 17th, 2007 at 9:21 am

Thanks for the tips. Am trying to use this for a small promo item which launches an html page. I have tested this onseveral machines and it is fine, but when it is sent out, the autorun does not run (apparently) - they are all on XP. Anyreasons why this might be?

18.

Tim Fehlman Says:January 17th, 2007 at 10:55 am

Mike,There are two reasons why this may not work:

This will only work with USB drives if they are running Windows XP Service Pack 2. Otherwise. this does notwork.

1.

Even if you are running WinXP SP2, the Autorun/AutoPlay feature may be turned off for these machines. It iscommon for some CD/DVD burning software to turn this feature off. Also, some system administrators can turnthis feature off if thye view it as a security risk.

2.

Hope that helps.

Tim

19.

Aaron Lowndes Says:January 21st, 2007 at 11:57 pm

Hi i have found a problem that the autorun.inf file could possibly fix but i don’t know the command.After using your autorun.inf ideas I have removed all of my .bat files from the root folder of the usb drive (they wereused to open programs) and now all that is left is a bunch of folders, two pictures and autorun.inf. The problem is thatnow my computer recognises the root of the thumb drive as a “pictures” folder and when i open it it has the incrediblyannoying “filmstrip” view. Is there a command in autorun.inf (or possibly a desktop.ini) to set this view to a differentdefault (i prefer “Tiles”)?

Cheers

Aaron

20.

Aaron Lowndes Says:January 23rd, 2007 at 5:52 am

Ok i have a suggestion (and a question) - I think this is pretty cool (more interesting than the last one anyway). I have afew icons that i would like autorun.inf to randomize, so a different icon shows each time i plug the USB stick in.

To do this I created “randomize.bat” in my USB’s root folder which contains:*****************set num=%random%

attrib autorun.inf -r -hdel autorun.inf /f

echo [autorun] > autorun.infecho label=Aaron’s Memory Stick. >> autorun.infecho icon=Programs\system\icons\icon%num%.ico >> autorun.infecho open=randomize.bat >> autorun.infecho shell\pstart = Start PStart >> autorun.infecho shell\pstart\command = Programs\Pstart\PStart.exe >> autorun.infecho shell\skype = Start Skype >> autorun.inf

21.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

6 of 49 2/27/2012 4:14 PM

Page 7: USB Drive AutoRun.inf Tweaking

autorun.inf

attrib autorun.inf +r +h**********

I have two questions:First, i notice that %random% seems to output a number based on the minutes, seconds and tenth-of-a-second past thehour. For instance if it is 4:22.18pm (and 4 tenths of a second) when I run the batch file, then the number is 22184.Fine, but how do I take the last digit out of that variable and store it as a new variable? I only have 9 icons, not 59599!Second, the “open” command is now used up. Is there a command that I can put in the batch file that would beequivalent to “open=\”?

Whew!

Aaron Lowndes Says:January 24th, 2007 at 2:22 am

Problem solved.

“set num=%random:~-1%” will generate a 1 digit random number and store it as %num%; and adding “explorer.exe \”at the bottom of the batch file will open the USB drive’s root folder in a new explorer window.I had 9 icons, i simply copied one and called it “icon0.ico” to ensure that I have the full 10.

So to clarify, the full randomize.bat file looks like this:***************@echo OFFset num=%random:~-1%

attrib autorun.inf -r -hdel autorun.inf /f

echo [autorun] > autorun.infecho label=Aaron’s Memory Stick. >> autorun.infecho icon=Programs\system\icons\meesh%num%.ico >> autorun.infecho shell\rand = Open >> autorun.infecho shell\rand\command = randomize.bat >> autorun.infecho shell=rand >> autorun.infecho shell\pstart = Start PStart >> autorun.infecho shell\pstart\command = Programs\Pstart\PStart.exe >> autorun.infecho shell\skype = Start Skype >> autorun.infecho shell\skype\command = Programs\Skype\Skype.exe /datapath:”Programs\Skype\Data” /removable >>autorun.inf

attrib autorun.inf +r +h

explorer.exe \Start Programs\Pstart\Pstart.exeexit*************)

22.

Mike Says:January 25th, 2007 at 3:19 pm

Tim,

Is there a way to use TrueCrypt on a system where you are not the Admin? If not, do you know of a program that stayson the USB drive and you can access on any computer?

Thanks,Mike

23.

Keviin Says:January 26th, 2007 at 3:21 am

Aaron,

24.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

7 of 49 2/27/2012 4:14 PM

Page 8: USB Drive AutoRun.inf Tweaking

you can use AutoIT to make a script for that icon randomizer, here, i’v done the hard work u can just compile it and urdone and maybe edit it a little bit to add the shell feature:

Creat these files with these codes:

iconshuff.au3this is the main file that will do the icon shuffeling————–Dim $ConfigFile

$ConfigFile = _GetConfigFile(”iconshuff.ini”,false)

If $ConfigFile = “Error” Then Exit

$noicon = IniRead($ConfigFile,”iconshuff”,”NumberOfIcons”,” “)$open = IniRead($ConfigFile,”autorun”,”open”,” “)$icon = IniRead($ConfigFile,”autorun”,”icon”,” “)$label = IniRead($ConfigFile,”autorun”,”label”,” “)$action = IniRead($ConfigFile,”autorun”,”action”,” “)FileCopy (”autorundummy.txt”, “autorun.inf”, 1)

$results = Random(1,$noicon, 1)If $results 9 and $results _GetConfigFile#endregion

FileSetAttrib(”autorun.inf”, “+H”)————————————

iconshuffopen.au3this is used to open the file that u want to autorun and also run the iconshuff.exe again so that the nxt time there willbe another icon———————–Dim $ConfigFile

$ConfigFile = _GetConfigFile(”iconshuff.ini”,false)

If $ConfigFile = “Error” Then Exit

$open = IniRead($ConfigFile,”autorun”,”open”,” “)

If StringMid($open,2,1)”:” and StringMid($open,2,1)”\” Then$open = @ScriptDir & “\” & $openEndIf

If Not FileExists($open) Then Exit

$open = IniRead($ConfigFile,”autorun”,”open”,” “)Run($open)

#region FunctionsFunc _GetConfigFile($filename,$silent = False)Local $configfilename$configfilename = @ScriptDir & “\” & $filename

If Not FileExists($configfilename) ThenIf Not $silent ThenMsgBox(16,”File Missing”,”The file ” & $filename & ” is not available.” & @CRLF & “Please ensure that it islocated in the ” & @ScriptDir & ” directory.”)ExitEndIfSetError(1)Return “Error”EndIfReturn $configfilenameEndFunc

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

8 of 49 2/27/2012 4:14 PM

Page 9: USB Drive AutoRun.inf Tweaking

————————————–

iconshuff.inithis file includes the configuration———————-[iconshuff]

NumberOfIcons=

[autorun];Do not add anymore commandslabel=;Directory to the icon folder, not the icon itselficon=open=action=———————–

make these files but don’t type anything into them:———————-autorun.inf-autorundummy.txt————————————-

the program will insert and imformatoin into the autorun.inf every time it’s ran. you’ll hav to run it once the first urusing it the generate the information for the autorun.inf. try is improve this script if u can and post the source here. alsoi don’t noe why but windows doesn’t always change the icon of my usb. somehow windows seems to cache the iconand uses it again if u plug it in, if u try a few times i changes. anyways, i hope this helps!!

Kevin

Keviin Says:January 26th, 2007 at 3:30 am

Aaron nice!!! love that icon randomizer thingoo it’s works great!! but then is there a way u can use that if u don’t hav10 icons or if u hav more then that? can u do it with a .bat file? if u can can u post the code.

but then i also made this program using AutoIt it uses a few files tho, i just want somthing that’s onli in a single file likeur .bat and the number of icons are user defined. so u can hav any number of icons u want. 100 is max i thnk. i can editthe script to enable more icons if u want. but then more then 100 icons? where will u get all that

you can try this out if u want:

just compile this and ur done and maybe edit it a little bit to add the shell feature:

Creat these files with these codes:

iconshuff.au3this is the main file that will do the icon shuffeling————–Dim $ConfigFile

$ConfigFile = _GetConfigFile(”iconshuff.ini”,false)

If $ConfigFile = “Error” Then Exit

$noicon = IniRead($ConfigFile,”iconshuff”,”NumberOfIcons”,” “)$open = IniRead($ConfigFile,”autorun”,”open”,” “)$icon = IniRead($ConfigFile,”autorun”,”icon”,” “)$label = IniRead($ConfigFile,”autorun”,”label”,” “)$action = IniRead($ConfigFile,”autorun”,”action”,” “)FileCopy (”autorundummy.txt”, “autorun.inf”, 1)

$results = Random(1,$noicon, 1)If $results 9 and $results _GetConfigFile

25.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

9 of 49 2/27/2012 4:14 PM

Page 10: USB Drive AutoRun.inf Tweaking

FileSetAttrib(”autorun.inf”, “+H”)————————————

iconshuffopen.au3this is used to open the file that u want to autorun and also run the iconshuff.exe again so that the nxt time there willbe another icon———————–Dim $ConfigFile

$ConfigFile = _GetConfigFile(”iconshuff.ini”,false)

If $ConfigFile = “Error” Then Exit

$open = IniRead($ConfigFile,”autorun”,”open”,” “)

If StringMid($open,2,1)”:” and StringMid($open,2,1)”\” Then$open = @ScriptDir & “\” & $openEndIf

If Not FileExists($open) Then Exit

$open = IniRead($ConfigFile,”autorun”,”open”,” “)Run($open)

#region FunctionsFunc _GetConfigFile($filename,$silent = False)Local $configfilename$configfilename = @ScriptDir & “\” & $filename

If Not FileExists($configfilename) ThenIf Not $silent ThenMsgBox(16,”File Missing”,”The file ” & $filename & ” is not available.” & @CRLF & “Please ensure that it islocated in the ” & @ScriptDir & ” directory.”)ExitEndIfSetError(1)Return “Error”EndIfReturn $configfilenameEndFunc#endregion————————————–

iconshuff.inithis file includes the configuration———————-[iconshuff]

NumberOfIcons=

[autorun];Do not add anymore commandslabel=;Directory to the icon folder, not the icon itselficon=open=action=———————–

make these files but don’t type anything into them:———————-autorun.inf-autorundummy.txt————————————-

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

10 of 49 2/27/2012 4:14 PM

Page 11: USB Drive AutoRun.inf Tweaking

using it the generate the information for the autorun.inf. try is improve this script if u can and post the source here. alsoi don’t noe why but windows doesn’t always change the icon of my usb. somehow windows seems to cache the iconand uses it again if u plug it in, if u try a few times i changes. anyways, hope u like it!

Kevin

Tim Fehlman Says:January 26th, 2007 at 6:29 am

Kevin and Aaron,You two have created some really nice code in the past few days. I’m pretty impressed. Cool concept and very niceexecution.

Keep up the good work!

Tim

26.

Aaron Lowndes Says:January 27th, 2007 at 7:06 pm

Wow I have been reading around DCoT and been thinking “what is this AutoIT thing that I keep reading about?” I juststarted playing with it - wow this is so awesome! It makes my batch file seem amateurish…

The script you made is awesome! I played around a bit and solved the single file problem, and improved the randomicon picker so you don’t need to have any regular names - just dump any number of icons into the \Programs\system\icons\ folder on your usb disk.

(compile this into run.exe and put it onto your usb drive):

Send("{ALT}fo"); when you double-click on the drive in My Computer, opens the drive by going File > Open.

If ProcessExists("PStart.exe") = "0" ThenShellExecute("PStart.exe", "", @ScriptDir & "Programs\Pstart\")EndIf; opens PStart if it is not already running

#Include [File.au3]; this has the _FileListToArray() function in it$iconlist=_FileListToArray(@ScriptDir & "\Programs\system\icons\",'*.ico',0); gets the names of all icons found in that folder and stores each as $iconlist[X].; the first one, $iconlist[0], is the number of icons found.$iconnumber=random(1,$iconlist[0],1); generates a random integer between 1 and the number of icons found.$icon=$iconlist[$iconnumber]; stores the name of that icon as $icon.

FileSetAttrib(@ScriptDir & "autorun.inf","-R-H")$inf_file = FileOpen("autorun.inf",2); the "2" means open the file and overwrite the contentsFileWriteLine($inf_file, "[autorun]")FileWriteLine($inf_file, "label=Aaron's Memory Stick. ")FileWriteLine($inf_file, "icon=Programs\system\icons\" & $icon)FileWriteLine($inf_file, "open=run.exe")FileWriteLine($inf_file, "action=Run etc. ")FileWriteLine($inf_file, "shell\runner = Open etc.")FileWriteLine($inf_file, "shell\runner\command = run.exe ")FileWriteLine($inf_file, "shell=runner ")FileClose($inf_file)FileSetAttrib(@ScriptDir & "autorun.inf","+R+H"); all pretty self explanatory.

One more question - the first line is really messy. How do i find out what command windows executes when I clickFile > Open?The problem is that if you execute run.exe directly, it loops. (open another file like autorun.exe to stop the loop)

Aaron

27.

Aaron Lowndes Says:January 27th, 2007 at 7:10 pm

28.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

11 of 49 2/27/2012 4:14 PM

Page 12: USB Drive AutoRun.inf Tweaking

Aaron Lowndes Says:January 27th, 2007 at 8:10 pm

Hey I just noticed that #Include doesn’t have the file name after it - I think that the discussion board software thoughtit was a HTML tag. That line (line #9) is supposed to read“#Include [File.au3]”but instead of square brackets make them triangle ones (sharp ones? the ones above your comma and full-stop)

29.

Keviin Says:January 29th, 2007 at 3:59 am

hey Aaron for some reason more then half or my codes were choped off from the post before?? what happnd to it??any way i created another one. this one only need two files instead of four go here to get the code. sorry i can’t paste ithere cause my codes are gunna get choped off by the discussion board software

here’s the linkhttp://rapidshare.com/files/13901953/USBIR.zip.html

if it doesnt work tell me and i’ll get a new link

30.

Cool Websites, Software and Internet Tips Says:January 29th, 2007 at 8:16 pm

stuff, best antivirus, email program, firewall, software suite…etc. TubesNow - file sharing and collaboration tool (free& secure) Wize.com - consumer product reviews (…‘unbiased product ranking based on thousands of expert and userreviews’) DailyCupOfTech.com: USB Drive Autorun - complimentary article to recently published post(How to turnUSB device into almost full scale pc), it explains how to configure USB drive to autorun desired programs as soon asit’s connected. Simple and clear.

31.

psrivats Says:February 8th, 2007 at 5:46 pm

Great article, thanks for the info!

I have a question for you guys: I have custom made USB HDDs (i.e. used laptop harddrives in external enclosures) andwhenever I try to ’safely remove’ these USB devices, I see something like “HTSxxxxxx USB device” - I know that theidentifier that is in the beginning is the Hard disk device name (same as what you see in the device manager forinternal HDDs). I have more than one custom USB HDD and at times it is confusing just with this name to correctlyidentify which is the one I want to stop. Is there any way to change the name that displayed in the ‘Safely RemoveHardware’ wizard?

32.

Lyman Says:March 9th, 2007 at 2:46 pm

I know you stated that the autorun.inf requires XP SP2;However, I run 98SE and it works fine on my 256M Lexar Jump Drive; but not on my 1G Memorex Jump Drive.Obviously the difference is not the Version of windows. Does anyone have a clue how to make the Memorex run likethe Lexar.I tried both Drives on a fresh install in another computer with a “universal jump drive driver” with the same results,which seems to eliminate the difference in Lexar/Memorex drivers.

33.

Ralph Says:March 29th, 2007 at 9:10 pm

The “Help, I’m Lost” does not show up on the autorun.Do I have to install it?What makes it pop-up there?

34.

Ralph Says:March 29th, 2007 at 9:12 pm

What does it mean “install to the root”?

35.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

12 of 49 2/27/2012 4:14 PM

Page 13: USB Drive AutoRun.inf Tweaking

Ralph,This is not the “Help, I’m Lost” article. It is over here. As for root, Wikipedia has a great definition.

Tim

Norah Says:April 5th, 2007 at 11:33 pm

hi..i’ve already tried all the ‘help!I’m lost’ and autorun splash screen.. all of that examples execute pop-up window screenshowing what option u need to select in order to access the program..what i need is the autorun.inf file which directlyplay the autosplash screen once i plug in the usb.. can anybody help me on this? your help is kindly appreciated..

37.

PEJOL Says:April 23rd, 2007 at 7:21 pm

http://infoklik.blogspot.com/2007/04/autorun-autoplay-english.html

38.

Emanuele Says:June 6th, 2007 at 11:06 am

This is very cool:

http://www.mypendrive.org

39.

Deb Says:June 27th, 2007 at 7:54 am

Hi, I followed the tutorial and diligently inserted the script but I’m sorry to report I never got my Flash application toautorun. The drive labeling is nice as is the “help” feature but as far as actual plug and play it was a no go…

Do you have any suggestions?

Thanks,Deb

40.

drbob_007 Says:June 27th, 2007 at 11:01 am

psrivats,

Just make a mental note of the drive letter assigned to the USB HDD you want to remove. Left-click the USB icon inthe system tray (”notification area”) to bring up a list of the USB drives recognized, then left-click on the one you wantto remove.

It’s fast and easy

drbob_007

41.

chathura Says:August 17th, 2007 at 4:10 am

tell me how to stop autorun in usb pen before it start to run

42.

Revski-Sensei Says:August 27th, 2007 at 4:36 am

I have a question… is there a way to make the autorun.inf open a particular folder in the USB drive?

43.

tic Says:August 31st, 2007 at 8:41 pm

just compile an autohotkey script whose contents are:

Run, “relative name of folder”

44.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

13 of 49 2/27/2012 4:14 PM

Page 14: USB Drive AutoRun.inf Tweaking

Now….does anyone know how to change the RMB of a usb drive to make it appear as a local disk on a computer?

Revski-Sensei Says:September 2nd, 2007 at 2:52 am

Thanks for the help it works!!! Actually, what i was doing was change the menu of the USB drive so that it won’tdisplay the usual

OpenExploreSearch

menu when you right-click on the USB icon…Thanks dude!!! is there a way to do this without using the autohotkeyscript?

45.

Mogens Beltoft Says:September 6th, 2007 at 3:45 pm

I have been using your setup on my XP SP2, but after changing to Vista (Home Premium) I’m having trouble usingautorun.inf and mounting TrueCrypt volumes.

My autorun.inf is:

[autorun]label=MyDriveicon=myicon.icoaction=Help! I'm Lost!open=Help!.exeshell\lost=Help! I'm Lost!shell\lost\command=Help!.exeshell\mount=Mount TrueCrypt volumeshell\mount\command=TrueCrypt\TrueCrypt.exe /q background /l x /m rm /v "Encrypted"shell\newmount=New Mount TrueCrypt volumeshell\newmount\command=TrueCrypt\TrueCrypt.exe /l x /m rm /v "Encrypted"shell\unmount=Unmount all TrueCrypt volumesshell\unmount\command=TrueCrypt\TrueCrypt.exe /q /d xshell\keepass=KeePass Password Safeshell\keepass\command=KeePass\KeePass.exeshell=lost

The encrypted volume is named Encrypted and is located in the root of the USB drive.

The problem is that I get the following error message when I mount the TrueCrypt volume, i.e. after having entered mypassword:“The system cannot find the file specified.”

This happens when using the shell\mount option above.

If I use the shell\newmount option above, TrueCrypt starts and I then have to select the encrypted volume file. But itstarts in C:\Windows\system32 and not from the root of the USB drive. I guess that is the problem for theshell\mount option.

But I can’t add the USB drive letter in autorun.inf, as it (of course) changes when I use the USB drive on anothercomputer.

What’s the cure? bat files?

/Mogens

46.

Kushairy Says:September 7th, 2007 at 10:49 am

wow. thx Tim! hey, any idea if its possible to change the background picture of my thumbdrive using autorun.inf?

47.

MattGooch Says:September 16th, 2007 at 5:00 pm

48.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

14 of 49 2/27/2012 4:14 PM

Page 15: USB Drive AutoRun.inf Tweaking

Mogens Beltoft Says:September 16th, 2007 at 5:47 pm

look at readme.txt. That’s the one holding the text displayed.

/Mogens

49.

MattGooch Says:September 17th, 2007 at 1:43 am

theres no readme file in the Autorun Dabbler’s Toolkit?

50.

Mogens Beltoft Says:September 17th, 2007 at 7:04 am

Sorry, I’m using DCoT Help!.exe, which displays the contents of readme.txt

/Mogens

51.

Brent Says:October 2nd, 2007 at 2:49 pm

Hi,

I have a problem and I happened to stumble here in search of an answer. After reading most of the comments, I thinkperhaps someone can offer me a solution or point me in the right direction.

I have an Autoit script on a USB drive that when inserted for the first time, will bring up a message box and direct to awebsite, then delete the script and hide the autorun.inf file. That part was easy. The part that I’m stuck on is I need itto simulate disconnecting and reconnecting the USB drive, so the standard dialog box appears (the one whereWindows asks you if you want to transfer pictures, open files, take no action, etc.).

I need it to do this because if the user tries to access the USB drive from My Computer, an error message appearssaying it cannot find the file (the Autoit executable). The only way to access the drive itself is to right-click on it andchoose explore.

If anyone knows of any solutions or a way to “refresh” the drive, please let me know. Thank you for your time.

52.

José Says:October 3rd, 2007 at 11:56 pm

Man, maybe this sound stupid, but how do I access to the Autorun.inf file in my USB thumbdrive, it doesn’t appear. Ican’t locate it.

53.

Mogens Beltoft Says:October 4th, 2007 at 7:40 am

José, just create one if it’s not there. A USB thumbdrive does not come with one from the factory.

/Mogens

54.

CuriousGuy Says:October 4th, 2007 at 1:52 pm

Without getting into a moral debate and just speaking code here’s what I’d like to create…

1. 8GB USB drive plugs into XP machine while logged in as the user.2. No popup at all3. Silent search for all .jpg/.bmp larger than 1MB4. Copy found files silently to USB drive5. Pull USB drive out

Everything happens “invisibly” with no warning/prompt/confirmation.

Could it be written?

55.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

15 of 49 2/27/2012 4:14 PM

Page 16: USB Drive AutoRun.inf Tweaking

José Says:October 4th, 2007 at 2:07 pm

Thanks Mogen, I’ll try it. I had been asking this for months and no one had answered.

56.

MikeyB Says:October 4th, 2007 at 2:44 pm

I have tried to use the “Dabbler’s Toolkit” to create my own menu of apps for my USB drive and (unfortunately) Ihave little knowledge of how to edit the files (as far as creating exe’s, etc). i do know how to edit the .inf file used tocreate personal icon’s, etc, but when I try to launch the DCoTMenu that came with the dabbler’s kit, it gives me thiserror message:“AutoIt ErrorLine 0 (File’F:\DCoTMenu.exe’):Run($Executable & ” ” &$Parameters,$WorkingDirectory)Error: Unable to execute the external program.The system cannot find the file specified”

The most confusing part of this is that while it is displaying this error, it is also working correctly in the system tray…why am i getting this error?

57.

Mogens Beltoft Says:October 4th, 2007 at 2:49 pm

CuriousGuy, your proposal/request is exactly why Windows does present a popup-menu before any code is executed. Iwouldn’t want my computer to accept your code, without giving me a chance to investigate what’s on the USBthumbdrive.

You do however have the possibility to set a mark in the “Always do this for…” checkbox. This will result inexecuting the same script the next time you use that USB thumbdrive, without presenting the popup menu.

/Mogens

58.

CuriousGuy Says:October 4th, 2007 at 3:41 pm

Can’t something be added to autoanswer or supress that pop-up?

and I’m horrible at code so i was hoping some people here would post there take at it…

Thanks again!

59.

Emanuel Says:October 11th, 2007 at 5:49 pm

Give a look at this, it’s fantastic for auturun almost everything on any drive:

http://www.totalautorunner.com

60.

TrueRock Says:October 26th, 2007 at 12:13 am

My USB memory stick would not autorun. I fixed the problem with Microsoft’s autorun repair program: AutoFix.exeSee:http://www.microsoft.com/downloads/details.aspx?FamilyID=c680a7b6-e8fa-45c4-a171-1b389cfacdad&DisplayLang=en

61.

Krissy Says:October 26th, 2007 at 11:00 am

My icon is not displaying as the drive icon or when the autorun dialog box comes up with my custom option at the topof the list. I have included it in the autorun.inf file as icon=rsa.ico and the file is residing on the root of the usb stick.Can anyone help. It’s driving me nuts!

62.

Thomas Says:63.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

16 of 49 2/27/2012 4:14 PM

Page 17: USB Drive AutoRun.inf Tweaking

I have a question. How would you make autorun.inf open up a program that has spaces in its name? I have tried thefollowing:open=”My setup.exe” andopen=My setup.exe

Thanks a bunch if you can help me.

Sincerely,Thomas

Diliaur Says:November 20th, 2007 at 8:30 am

I wish I could use this, but when I try to create an autorun.inf file it says there already exists one - but I can’t find it,even when I turn on the view hidden files and folders option. Help?

64.

Sven Arsenault Says:November 22nd, 2007 at 9:14 am

I would like to know if you can make the card function in the same way as a CD/DVD autorun files. Meaning i don’thave to click anything to make it run. I would like it to every time i plug it into any XP computer. I have a text file withowner information and i would like it to pop up whenever i plug it in. Is there anyway to do this?please help, thanks Sven

65.

Adrian Says:January 3rd, 2008 at 9:27 am

@Thomas

You need to enter the command in short filename format if you have spaces, e.g.:open=Mysetu~1.exe

If you don’t know the short filename for your program, then open a command prompt window in the directory andenter dir /X

66.

Don H3 Says:January 6th, 2008 at 1:24 am

Does anyone know how autorun.inf on a USB drive can be used to set a user-environmental variable, eg. to notatewhat drive letter the USB drive is on?The problem I am running into is that I have a number of links to various programs and configuration files on the rootof my general purpose USB drive, but windos requires a drive letter be hard coded. Which will probably blow up onmachines other than my own, unless I can specify it via an environmental variable.Thanks,H3

67.

Robert Carnegie Says:January 6th, 2008 at 3:50 pm

Does the XP CMD environment variable formula %CD:~0,1% work for drive letter? (0,2 for letter and colon.)Possibly not; I don’t have the bits here but the need for non-drive-specific file paths was already mentioned.

Perhaps the thing to do is to give your USB drive a characteristic volume label, and look through volumes for that. Butthat’s tricky as well.

68.

Don H3 Says:January 6th, 2008 at 11:02 pm

Yes!, that seems to work under my cmd.exe. I didn’t realize when I made the original query, but it is actually a 2-partproblem: Now that I have the drive letter, I still need to get it into the User’s Environment for the duration that theUSB drive is attached.—But according to Rex Conn’s documentation that requires getting into the user’s Registry. And I don’t know anysoftware that can run from a USB drive and do that. (The problem is trivial using Rex’s 4nt etc, which I use instead ofcmd.exe on my own machine. But I can’t expect other machines to have it).Thanks for the help!

69.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

17 of 49 2/27/2012 4:14 PM

Page 18: USB Drive AutoRun.inf Tweaking

Gawdin Says:January 9th, 2008 at 9:10 pm

does anyone know if there is a command for making the autoplay to execute the default command?

for example

[AutoRun]OPEN=CO\PLAY.EXEICON=CO\PLAY.EXEACTION=Run ConquerLabel=Conquer Onlineshell\open\command=CO\PLAY.EXEshell=open

now normally a popup asking what it should do appears and the default command highlighted is ‘Run Conquer’,however it does not give me a check box to make it always do such an action. I am looking for a command to eitherenable this or just execute the command

70.

alfred Says:January 21st, 2008 at 12:49 am

I can’t open my drives on double click on XP SP2 after deleting Win32 NSanti virus. This virus might have changedmy autorun.inf file which is below-

;oa4rwK38k4ao5idSKoj3cj3j6lao0407ssS3oqjka4dkpfasAq9defXK53ak7asf59k4aA2lDD82diai9q1sr5l2AZkAw0o3nLk[AutoRun];kodSq7kp40DrlDk854Aa0q6Sso7awopen=d.com;Owi10l2koJ3Za7JKwIk9DasA8sFknAkw33qr3Kik4oshell\open\Command=d.com;Ks042Xw2KOo1LqHd0JllidrwKifsDalI4k4frL9kSsA0D3s8dL0s28iLmkww2eAshell\open\Default=1;ScXD3Kn3qdKla53ashell\explore\Command=d.com;3ldKXskKlar2ks2sipwKwLA0ilq44D37kw0kD3Lrir22f12ds9qKo0kLr8daSJsDqdrasAalfjrd4Caolwk1rDLljZi7aZrwAswdKwDid570JIlFi2ie1SOA

How can I restore this to default settings? Pls help

71.

Ben Says:January 23rd, 2008 at 9:14 pm

found this on the MSDN site … might be usefulhttp://msdn2.microsoft.com/en-us/library/bb776823.aspx

72.

jb Says:January 24th, 2008 at 8:40 am

Hi there, I have a number of USB drives (5 at last count) which I use for a variety of things. I have setup up autorunsfor them all e.g.[autorun]open=.\drive\autorun.exeICON=.\drive\icon.icoaction=Jason USB Menu!label=Jason USB 2Shell\Option1=Run USB menuShell\Option1\Command=.\drive\autorun.exe

I have set up a menu using fastmenu http://www.pollensoftware.com/autorun/fastmenu.html to display help (located indrive folder) etc.

What I am looking to also do & can find NO information anywhere about this is to automatically set a drive letterusing autorun - I have setup the letters on my desktop computer but want to automatically setup the same drive letterswhen on my computer at uni.

73.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

18 of 49 2/27/2012 4:14 PM

Page 19: USB Drive AutoRun.inf Tweaking

any help would be appreciated.

Many thanks Jason

Mogens Beltoft Says:January 24th, 2008 at 3:35 pm

Jason, I’m afraid that’s not possible. The drive letter has already been assigned at the point where autorun is executed.

You can assign your preferred drive letter from the disk management tool in the control panel.

Try google “usb drive letter”.

/Mogens

74.

maximilian Says:January 31st, 2008 at 6:41 pm

I’m used to using the EJECT menu when right clicking an icon, but I just recently realized that sometimes XP is stupidand still gives me power (well, my USB), and so I am like “NO!!!”~okay, I’ll mature up a tad.

“Eject” has become a pain, and I find that “Safely Remove Hardware” is too many clicks and too far away (in thecorner). I generally always have MY COMPUTER open because I use my menus often (well, did before I switched toa new 2 gb usb, from 1gb, and have yet to move portable apps) and I’d just like a menu item that’d let me safelyremove my drive.

I have read around and I believe, without an program, it is impossible to just ’safely remove’ my drive. I found that Ican use %windir%\system32\RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll in a batch file to startup the “Safely Remove Hardware” menu, but even though the batch would close, I still be unable to eject it, because itis said to be in use (until I close the Safely Remove Hardware window).I fixed this by creating a shortcut, and putting that text up there into it, and it works, in my opinion, even better (nobrief, black CMD.EXE popping up). The only flaw I’ve found is that I don’t believe I can add a .lnk file to theautorun.inf and have it work from the context menu.

Perhaps shortcuts just can’t run from the registry? I’ve also attempted putting that text directly into the autorun.inf, butI’m then told *checks*“H:\Access is denied.”

How can I get around this??T____T(Oh, and a last odd question, when using file locations in the autorun file, do I need it to say, for example .\icon.ico

instead of just icon.ico?(Yeah, I just have it in the main directory, just hidden and made system… that’ll change when I move apps over,though.)

Please help, please excuse my horribly constructed sentences, and thanks in advance.

75.

Sophism Says:February 4th, 2008 at 12:20 pm

incredible thanx

76.

Elliot Says:February 9th, 2008 at 5:29 pm

Thanks a lot *bookmarks daily cup of tech*

77.

Techtonic Says:February 10th, 2008 at 12:57 am

Am a NEWBIE!THIS IS RELATED!I’m using the autorun to display all sorts of things that my friends always think that my USB drive has virus orsomething. I did contract a virus that uses vbscript to perform its nasty actions. It’s tied to autorun.inf. Plus it did not

78.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

19 of 49 2/27/2012 4:14 PM

Page 20: USB Drive AutoRun.inf Tweaking

I’m just having fun messing with my friend’s head. He likes viruses in computers but always tries to destroy or alterthem. Heh.

Tao Says:February 12th, 2008 at 1:34 am

hi. i have a question and i know it’s not an easy one.

I have an external hard disk that i happen to connect to a lot of computers, in order to give stuff to or take stuff fromothers. The problem is that some of those computers have trojans that get executed when i plug my hard-drive in. Also,the disk has 3 partitions and all of them get their autorun.inf files rewritten, even if the partitions are not opened.

I know that disabling Autorun for any drive is possible and failry easy.

But is there a way to disable Autorun for a disk drive, regardless of the OS and or Autorun settings of the hostcomputer? And is there a way to make autorun.inf not rewritable, or at least harder to edit by scripts?

Thx in advance.

79.

Tao Says:February 12th, 2008 at 7:41 am

To be clearer about my request. I’m wondering if it’s possible to make a code that would prevent the drives of myexternal disk to be Autorun or Autoplayed on any computer, without interferring with the host system. I don’t want acode that disables Autorun on any computer I connect my drive to, as people would eventually point at my disk andsay I have a virus that “damages” (actually alters and disables) their system settings. Which would be true.I just want my drives never to be Autoplayed, if possible. I want an Autorun.inf that prevents itself from beingmodified and “run” (in the sense that its only function would be to stop any hidden or silent script to execute the usualautoplay on my partitions).Do any of you think this can be done?

80.

sunshine Says:February 14th, 2008 at 2:14 am

Dear All,

Not exactly related but…is it possible to have a script that runs automatically, or a no be user run it may be right fromthe desktop, when a usb drive is inserted? I basically need it to perform the below mentioned tasks:

1. to run attrib -h -r -s -a *.*2. search and list certain files and folders based on an existing list3. del “directories / filenames of my choice” (basically few malware spreading on our computers via usb drives)

Such that it saves time for manually cleaning many drives cause the list of baddies is quite small and restricted, but thenumber of pc’s and drives is many. I’m not exactly a scripting guy so please make your suggestions simple and may beready to use and modify, which i’m sure they’d be seeing the comprehensiveness of the above post.

I’d gladly make myself available for any other info.

Regards,sunshine.

81.

Abhilash Says:February 20th, 2008 at 2:26 am

Hi All,

Is this Autorun functionality is supported in Windows 2K SP4. Because I am trying to make my USB stick autoruncapable, and its working fine in XP Sp2. But the same is not working,even its not showing the label or icon in 2k SP4.Similarly, the default behaviour set using are not working in Windows Vista. The autorun.inf is as follows

[Autorun]open=myApp.exeicon=myIcon.icolabel=ItsMine

82.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

20 of 49 2/27/2012 4:14 PM

Page 21: USB Drive AutoRun.inf Tweaking

shell\ItsMine\command=myApp.exeshell=ItsMine

Could yo please help me to sort this out. Thansk in advance.

-Abhilash

Nitin Says:February 29th, 2008 at 7:41 am

GR8 JUST WHAT I NEEDED!!

83.

Mat Lampitt Says:March 7th, 2008 at 7:00 pm

ok, after reading all this i still havent come accross any way of simply plugging in a usb pen and having it exicute aapplication automatically without menu’s or 3rd party software installed on the pc.any idea’s anyone??mat

84.

Prince_of_Light Says:March 7th, 2008 at 10:35 pm

Is it possible to have more than one open command in the autorun.inf file so that AutoPlay has more than one optionfor different programs on the device?

85.

buzzer Says:March 11th, 2008 at 10:46 am

Is there a way to make a .bat file run once when the drive is connected, but after that (like when double-clicking thedrive in My Computer) have it only explore the drive?Thanks.

86.

Daniel Says:March 12th, 2008 at 7:05 am

This is great get ur usb to autorun like a cd its so simple i had been trying everything til i read this and it worksperfectly

http://infoklik.blogspot.com/2007/04/autorun-autoplay-english.htmlPosted by infoklik

87.

Greg Says:March 14th, 2008 at 9:36 am

I have been reading your information and have a few questions for you.1. How could I set the autorun so it opens my computer then the thumb drive when it is incerted into the computer.2. I would like a banner to pop-up when ever the thumb drive is incerted into the computer or you double click theUSB drive from explorer or my computer. When you double or single click I want the banner to pop-up then when youhit ok move to open the thumb drive in either explorer or my computer.

88.

Mark Says:March 17th, 2008 at 4:12 pm

is there any way to limit the number of options the user is given when the USB stick is inserted? right now it gives theoptions to view video, pictures, etc.

is there any way to just have it say what the ACTION= says and get rid of all the other options in Windows XP?

89.

mmm Says:March 24th, 2008 at 6:57 pm

kiviin coud you make a zip ofRandom icon

90.

random Says:91.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

21 of 49 2/27/2012 4:14 PM

Page 22: USB Drive AutoRun.inf Tweaking

Keviin coud you make a tested icon randomizer and store it in a zip because i keep get error on autoit

jk Says:March 25th, 2008 at 7:00 am

Hi I wanted to know that when we right click the usb drive, can we put another text or label instead of “Open”. Forexample instead of “Open” i want “Enter”

92.

random Says:March 25th, 2008 at 7:31 am

random Says: Your comment is awaiting moderation.March 25th, 2008 at 6:47 am

Keviin coud you make a tested icon randomizer and store it in a zip because i keep get error on AutoIt plese help i lovedcot i found this aticle on popsci but, your the coolist webtise of all and i me all!!!!!!!!!!!!!!!!!!!!!!!! DCOT ROCKSOUT LOUD!!!!!!!

93.

virintove Says:March 25th, 2008 at 5:46 pm

ok guys, im noob too but with all that i read here i built up this code. it changes the USB name/icon but the main thingis that when you plug in the usb, the computer will shutdown immediately:

the code:———[autorun]icon=minesweeper.icolabel=VirIntOveshell\death=Self Suicideshell\death\command=temp_asgjeshell=deathuseautoplay=1———minesweeper.ico ->ico image in the rootinstead of “temp_asgje”, put “%windir%\system32\shutdown.exe” (no “”)the useautoplay=1 does the whole thing once you plug in the USB..(works only on XP)i tried this but now i cant figure out how to remove the “autorun.inf” off my USB [rools eyes] haha;)enjoy..thnx

94.

Mat Lampitt Says:March 26th, 2008 at 2:00 pm

ok, iv had a play with the…. “useautoplay=1″ thing and it hasnt worked for me.i have windows xp pro, service pack 2.my autorun options are set to “Prompt each time” which is default xp.this is my AUTORUN.inf text

[autorun]shellexecute=Project1.exeaction = Project1.exeuseautoplay=1

95.

Mogens Beltoft Says:March 26th, 2008 at 2:34 pm

Try googling “disable autorun”, there are a few ways to disable it.

Back in the Win 95 and 98 days I believe you could hold down the shift key while loading a CD. Does that work forUSB keys on XP?

/Mogens

96.

John Dixon Says:97.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

22 of 49 2/27/2012 4:14 PM

Page 23: USB Drive AutoRun.inf Tweaking

Thanks for this - I’d been scratching my head, and trying various small applications, but my file is now launching justhow I want it. A really useful article.

Bob Rawding Says:April 10th, 2008 at 2:50 pm

I have tried numerous proggies to manage my USB drives - and all apologies to the DCoT webmaster / author TimFehlman and the DCoT afficionados - I FINALLY found what really works great - it’s Pegtop’s PStart and it is “100%free” [its developer asks for donations through PayPal]. Look here - http://www.pegtop.net/start/ This software isreally really really really slick. You can put portable apps on it, tell PStart to search on the USB it’s installed on, and itwill create a menu item for the executable. It will also make autorun.inf’s for you. With a TON more stuff that it iscapable of doing, it saves a LOT of time and effort.

Thanks DCoT for your continuing efforts. I think PStart is worth looking at.

–Bob–

98.

Maria Says:April 11th, 2008 at 4:22 am

Hello Freinds

i have some question, is that possible to make a usb pen bootbale where i can install windows xp?I try it this inf[AutoRun]action=”run setup.exe”icon=setup.exeopen=setup.exe

when i booting computer with usb, I can’t install windows from a usb pen. is there anyone can help me, how should ido.

thanks alot

99.

Scatter89 Says:April 11th, 2008 at 9:57 am

I am running XP (SP2) and am having problems with my Klingmax usb storage key. Although the system recognizesthe “USB Mass Storage Device” in the Device Manager and reports no problems with the device, it will not recognizethe device on my system (ie. in Explorer).

The hardware appears to be working fine as the USB device works fine (the first time) in other computers running XP,and the USB port recognizes my other USB devices.

I recently compiled/installed a new program on the USB device:______________________________________The autorun file:

[autorun]UseAutoPlay = 1icon=mammooth.icoopen=Help!.exeaction=Help! I’m Lost!label=(2G) HELP ME, I’m Lost!shell\open\command=Help!.exeshell\open= (2G)Help, I’m Lost!shell=Help!.exeopen=truecrypt.exe___________________________

Im thinking the problem is the “UseAutoPlay = 1″. I think it is changing the way the computer is reading the USB portto make it act like removable media. I added this so the exe file would be run automatically.

Taken from http://msdn2.microsoft.com/en-us/magazine/cc301341.aspx

100.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

23 of 49 2/27/2012 4:14 PM

Page 24: USB Drive AutoRun.inf Tweaking

platforms that support it. This value was introduced in Windows XP and will have no effect on prior versions ofWindows. When this value is present, it will take precedence over the open and ShellExecute values. As with theShellExecute value, this value should be used with care. It is intended primarily for use with multimedia content forwhich Autoplay support was added to Windows XP. If the media might be used on earlier versions of Windows, theAutorun.INF file should also provide a value for open, since UseAutoPlay has no effect on Windows versions prior toWindows XP.To maintain support for existing media using Autoplay V1 features, Autoplay V2 drops back to V1 behavior in somescenarios. If Autoplay V2 finds an Autorun.INF file without a UseAutoPlay=1 entry, or detects an audio CD or a DVDmovie, then Autoplay V2 behaves as Autoplay V1 used to behave.”

I seem to have turned on the AutoPlay V2 and it is causing my system to not recognize the USB stick anymore.

This doesn’t make any sense to me….

Any suggestions would be appreciated.

Bob Rawding Says:April 11th, 2008 at 1:03 pm

Scatter89,

If you have XP and Tweakui installed (get Tweakui from Microsoft’s website - do a search), click the Windoze Startand then the “Run…” option. Type in tweakui

When Tweakui starts click on the + next to My Computer on that menu then on the + next to Autoplay. See if autoplayis turned on for the drive you used to see as your USB.

If that doesn’t work, plug in the USB stick into a working USB port, then go back to the desktop and right-click on theMy Computer icon, and left click on Manage

When the Computer Management box opens, click on the Disk Management submenu under the Storage menu. See ifyour USB stick is displayed now.

If not, right-click on Disk Management and left-click on Rescan Disks.

Also you can check to see if you have a network drive conflict with a drive letter. The network drive might have to bedisconnected before the USB stick shows up; it might be trying to use the same drive letter. You can then go back toComputer Management and change drive letters to resolve the conflict(s).

—Bob—

101.

Scatter89 Says:April 14th, 2008 at 6:39 am

Thanks Bob, it was a drive letter issue.

For some reason the AUTORUN file changed the drive letter. Although I am not sure why this was the case, I’vechanged it back and now it works great.

I appreciate it!

102.

jack Says:April 17th, 2008 at 6:40 am

tim you are a legend thanks a lot you really helped me

103.

kyled Says:April 18th, 2008 at 9:21 pm

is it possible to insert a usb drive and have it open an application automatically without any menus on multiplecomputers without installing software?

104.

kyled Says:April 19th, 2008 at 6:15 am

105.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

24 of 49 2/27/2012 4:14 PM

Page 25: USB Drive AutoRun.inf Tweaking

kyled Says:April 19th, 2008 at 6:52 am

this is a link to a site which offers a program tto enable complete autorun

106.

kyled Says:April 19th, 2008 at 7:01 am

sorry here is the linkhttp://www.simtel.net/product.php[id]84921[sekid]0[SiteID]simtel.net

107.

kyled Says:April 19th, 2008 at 7:02 am

tim,is there a way to get 2 different custom options to come up on the autoplay popup?

108.

kyled Says:April 19th, 2008 at 7:03 am

tim,is it possible to get 2 different custom options to come up on the autoplay popup?

109.

random Says:May 2nd, 2008 at 7:07 am

i made 2 programs###################################################################Dim $iMsgBoxAnswer

$LowerLimit = 37$UpperLimit = 767$RandomNumber = Random($LowerLimit,$UpperLimit,1)

Beep($RandomNumber,500)

$iMsgBoxAnswer = MsgBox(48,”random”,”beep”)SelectCase $iMsgBoxAnswer = 1 ;OKmsgBox(64 ,” beepFrequency “, “beep Frequency is: “& $RandomNumber )

EndSelect

2program############################################################

Beep(500,500)Dim $iMsgBoxAnswer$iMsgBoxAnswer = MsgBox(266260,”Fatal Error”,”worldwideweb Fatal Error (0×266260)” & @CRLF & “somedata may have been lost” & @CRLF & “Shutdown?”)SelectCase $iMsgBoxAnswer = 6 ;YesMsgBox(0,”shutdown”,”worldwideweb will now shutdown and/or computer”)Sleep ( 5000);shutdownShutdown(6)Case $iMsgBoxAnswer = 7 ;No

EndSelect

110.

we need help Says:May 2nd, 2008 at 7:19 am

i see were on the same page of the book

# mmm Says:

111.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

25 of 49 2/27/2012 4:14 PM

Page 26: USB Drive AutoRun.inf Tweaking

kiviin coud you make a zip ofRandom icon# MyAvatars 0.2 random Says:March 25th, 2008 at 6:47 am

Keviin coud you make a tested icon randomizer and store it in a zip because i keep get error on AutoIt

Gav Says:May 2nd, 2008 at 8:44 am

Question…

Does anyone know how to set up context menu but retain the normal double click action that the OS uses when their isno autorun.inf present on the USB device.

For example; I create autorun.inf file for ICON and LABEL which works fine. However when i add in a context menuline (e.g. shell\mount=mountshell\mount\command=

The normal double click does not open the USB device as usual.

112.

Stephan Says:May 8th, 2008 at 9:14 am

I have a weird problem with my thumbdrive. The label and action functions seem to work, but if I call open orshellexecute it refuses to run the program automatically when I plug the usb in. I am using Windows XP sp2. Anyonehas any comments?

[autorun]shellexecute=aa.exelabel=bleahbleauseautoplay=1

113.

Paul Says:May 9th, 2008 at 10:04 am

I created an auto run program that works great on a CD, then I used the suggesting’s above to make it work on a USBstick. Everything work perfectly but, I don’t want that window to open(the one under “Setting AutoPlay Options”)that says “What do you want Windows to do”. Right now my program runs and that window pops up. I only want theprogram to run.Can you turn off the window some how?I’m using Windows XPThanksPaul

114.

smiler Says:May 29th, 2008 at 6:34 am

Umm… This is great because I can hack the computers at my High school. The poor system Admin doesn’t get why************ autoruns when he puts his CD in a computer.

This is great

2 thumbs up

115.

Rudy Khoiruddin Says:May 31st, 2008 at 1:30 am

nice tips, tank’s call me if have anice tips again

116.

Mark Says:June 11th, 2008 at 3:28 pm

To disable autorun.inf read this: http://www.tirasoft.comDon’t instal usbdefender, just start disable.reg

117.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

26 of 49 2/27/2012 4:14 PM

Page 27: USB Drive AutoRun.inf Tweaking

I figured out how to make Windows XP and Vista run the program you want for autorun.inf without having the dialogbox come up like normal.

Add these lines to your autorun.inf

open=program-of-your-choice.exeshell\open\command=program-of-your-choice.exeuseautoplay=1

Of course, this won’t work if autorun is disabled or if the user holds the shift key down while inserting the usb stick.

Bob Ellington Says:July 20th, 2008 at 6:40 pm

Using Vista, all Autoplay options set to “Ask me every time”. On the USB stick (mine is an old 128MB Lexar), Icreated an “images” folder and one named “_empty”. My icon is in “images”, “_empty” is, well, empty. Here is myautorun.inf:

[autorun]start explorer /e,/root,MYCOMP~1,/select,%CD:~0,2%icon=.\images\BobElBlu.icolabel=0-BE-1’s Lexar

[ExclusiveContentPaths]_empty

The only thing in the root are folders and autorun.inf. Autoplay does not open because it does not “see” any images,audio or video files (or anything else.) Windows Explorer opens with a complete directory tree on the left with theUSB selected, and the contents of the USB root listed on the right. Voilà!

You have to click on a different drive in the left pane before you can Safely Remove the USB drive.

As for starting more that one application, play around with this: in the inf file, point to a batch file

shellexecute=autorun.bat

which contains the commands you want to execute. On the end of the command line append ” & exit” — I haven’tplayed with this too much, but it closed the Command Prompt window and seemed to execute the commands. Youmay have a problem with locked processes this way. I further suggest you check out Cedrick Collomb’s Unlocker at

http://ccollomb.free.fr/unlocker/

Hope this solves the Vista problems; I have not had a chance to test all this yet under XP. Cordially, 0-BE-1

119.

namzer0 Says:August 1st, 2008 at 12:12 am

does anyone know how to autorun a file whenever i open MyDocuments or my HardDisk or C:\ Drive?I tried testing the autorun USB thing but none happens(I haven’t tested if the PC needs to restart for this option to work) email me plsss [email protected]

120.

namzer0 Says:August 1st, 2008 at 12:16 am

It works for my USB drive (THANKS!!! I CAN HACK MY ****** BATCHMATE)but I cant get rid of the ’selecttask’ menu (the one asking for open to view files, take no action, play, etc…)I tried comment 118, but it didn’t work…

121.

Rey Says:August 6th, 2008 at 2:13 am

I searching for an autorun codes which will show only the USB root every time it will stick in my PC.Would anybodythere lend me a hand?please email me @ [email protected]

122.

cyberpunk Says:123.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

27 of 49 2/27/2012 4:14 PM

Page 28: USB Drive AutoRun.inf Tweaking

hey every1 does anybody of u knows how to put a background like the desktop in the usb window…?

John T Says:August 24th, 2008 at 2:42 pm

I need help with a small problem..

What I want is to make a second “Explore” in the context menu.Here is the code:

=-=[autorun]label=John’s USBopen=fake.bataction=Open Game!shell\Explore\Exploreshell\Explore\command=fake.batshell=Explore=-=

Whenever I right click my USB the old “Explore” has been overwritten with the new command. Can anyone help?

124.

knights Says:August 27th, 2008 at 3:10 am

i need help i want to secure my usb wath shuld i do??

125.

Matt Says:September 4th, 2008 at 3:38 am

First, learn to spell. Then I suggest going to www.truecrypt.org and download their software. Then use that inconjunction with an “autorun.inf” to secure your USB key.

126.

shyam Says:September 11th, 2008 at 5:32 am

hi to all

i want to copy a folder or file to usb drive or usb to c: drive by autorun

pls help me how to do thisthanks

127.

Joc Boyer Says:September 21st, 2008 at 4:35 pm

Did I make a Booboo! I did create an autorun.inf to make Portable Applications work on my 4 GB USB drive. I finallygot it work like a charm. Now it’s the anniversary of my daughter and I did want her to have the same so she can use itas a lifesaver in case her main PC is out of reach. She is studying at the Univ. So I did format in FAR32 the USB Keyand copy everything I have on my USB to hers’. Now the autorun.inf start, the window of Windows open with themessage ‘There are multiple file format on this ….’ but it does not show any application or file reader like real playeror windows media player… I have a blank content. Do you know what cause this issue? Please forward the answer tomy email because I am going on a 2 weeks trip with multiples stop where I will mostly limit my web activities to myemail……….. Thanks

128.

David Colledani Says:September 28th, 2008 at 10:30 am

Hi!

I’ve made an autorun.inf script for a usb drive:

[autorun]open=bal\blad\dss\Project1.exeshell\open\command=Project1.exe

129.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

28 of 49 2/27/2012 4:14 PM

Page 29: USB Drive AutoRun.inf Tweaking

when I plug the usb into the PC, the .exe starts automatically, works like a dream… but ONLY when in root are:autorun.infProject1.exe

when I put some other files on (music, pictures…) I get this message:

http://img404.imageshack.us/my.php?image=52897496fg6.jpg

I would be very pleased if someone could solve this problem.

Cheers!

Dave Says:September 28th, 2008 at 5:25 pm

Hi there,I made my own autorun.inf file.However, my system overwrote it with a new one. Do you know any way of prevfenting this?Cheers

130.

RadGH Says:September 29th, 2008 at 1:47 am

@David Colledani:If you have music/pictures/videos on your drive you need to specify the CONTENT inside autorun.inf, like so:[Content]MusicFiles=falsePictureFiles=falseVideoFiles=false

For more details on modifying your autorun.inf files you can read the official Microsoft MSDN Article

Also, I spent awhile creating an application launcher to open instead of listing multiple shell\ options. You candownload it and use it for free including source code from here: Drive Launcher 1.0.zip

Once you set up the config.ini file (and the autorun.inf if you want), you will be given a GUI window with differenticons of applications/files on your computer. Give it a try

131.

G Says:September 29th, 2008 at 5:38 am

can i do auto run in a new text pad???by starting [autorun]?

132.

Toby Says:September 29th, 2008 at 1:04 pm

Hi Folks,

Just created the following autorun.inf in root of my usb-stick:

[AutoRun]label=Tobi's USB-Stickicon=.\Progra~1\Mozill~1\chrome\icons\default\messengerWindow.icoopen=StartThunderbird.bataction=Thunderbird starten

Could not tell WinXP home SP3 to start TB from the subdirectory, although the icon was recognized. Had to createStartThunderbird.bat in usb-stick-root:

@echo offcd .\Programme\Mozilla Thunderbirdcall thunderbird.bat

Not really nice, but works fine so far

Have a nice day,

133.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

29 of 49 2/27/2012 4:14 PM

Page 30: USB Drive AutoRun.inf Tweaking

jonathan Says:October 3rd, 2008 at 2:34 pm

I’m using your tool, however, when i plug in the stick, it’s getting all the way to the point where it’s opening thedesired application, and I’m asked if i want to start a new firefox session or reopen the previous session. When I clickstart new, I get what I’m able to get the desired effect. How do i get the auto run bat file to override that step that askswhether I’d like to start a new session?

this is what’s currently on my bat file:@echo Loading CD@c:\temp\process -k firefox.exe@start [desired web address]@clsexit

134.

jonathan Says:October 3rd, 2008 at 2:38 pm

One more thing: we also have an auto run text on our root drive:[autorun]open=autorun.bat

135.

gellie Says:October 4th, 2008 at 9:31 am

where to find my USB roots???

136.

Ibrah Says:October 8th, 2008 at 2:01 am

Hey guys i found new ways to customize usb drivesWhere You Can Put A background image on USB drive just like setting up a wallpaper.Here is the code.NB Copy tonotepad and save as Desktop.ini****************************************[{BE098140-A513-11D0-A3A4-00C04FD706EC}]iconarea_image=\Sup.jpgiconarea_text=0×00FFFFFF***************************************

Also note in the inconarea specify the image location

137.

Dave Roth Says:October 10th, 2008 at 2:24 pm

Is there a way to place a desktop icon on the PC screen that will launch the autorun.inf on the cd? We are running XP.Thanks

138.

vips Says:October 21st, 2008 at 10:58 am

hey folks…..i know this may sound a little dumb but i used this autorun dabbler toolkit and use it to modify autorun.inf n all…..butwhen i sat on a different computer on a different net cafe the autorun.inf file itself was getting deletedautomatically…..i tried creating a new one but to no effect…..it is windows sp2 and i have show hidden files on…..stilli cant see autorun.inf and every time i plug my usb it performs normal autorun.inf and the autorun.inf file i created getserased automatically…..please help…..…..vips

139.

Ash Says:October 22nd, 2008 at 3:57 pm

Is there a way to autolaunch a particular program without having Windows Prompt Screen come up? I want it so thatas soon as you plug in the USB Flash Drive - my program will pop open.

140.

Gaurav Anand Says:141.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

30 of 49 2/27/2012 4:14 PM

Page 31: USB Drive AutoRun.inf Tweaking

great, it is quite good information,but only basics are there.I need more information about autorun.inf

Nick Says:October 28th, 2008 at 1:49 pm

Is there a way to have opening a folder trigger an Autorun/Autoplay within the folder?Thanks

142.

MrD Says:October 29th, 2008 at 12:01 pm

For comment 123

My USB\Desktop.ini

[ExtShellFolderViews]{BE098140-A513-11D0-A3A4-00C04FD706EC}={BE098140-A513-11D0-A3A4-00C04FD706EC}[{BE098140-A513-11D0-A3A4-00C04FD706EC}]IconArea_Image=1

(where 1=the image on the usb)

143.

Nofxtome Says:October 30th, 2008 at 2:42 am

Hi everyone,

I have a very simple ‘problem’ with my autorun file and I was wondering if one of you would happen know a solutionto my problem. I have a very simple autorun file on my external hard disk:

[autorun]label= Media Paradiseicon = .\Pictures\Icons\Safe.ico

On my HD I have a couple of directories, among which the directories .\audio & .\video. Is it possible to set a customicon for these directories (and other sub-directories)?

144.

jp26198926 Says:November 2nd, 2008 at 4:27 am

hello guys..

1. i used (UseAutoplay=1) but i can still see the pop-up window.why?

2. is it possible to automatically “eject” the usb flash disk whenever the user “left-click” on it?

thanks in advance

█ jaypee █

145.

vips Says:November 5th, 2008 at 6:31 am

hey friends…..

i saw how u can change the background of folder…..but can i create any file to put random wallpapers on my root folder everytime i plug my usb in?????…..

146.

Quincy Says:November 5th, 2008 at 9:34 am

whenever i insert my pen drive, it automatically displays a virus called malaware located in autorun.inf. Even when idelete the virus, it regenerates after 1min. what should i do pls.

147.

vips Says:148.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

31 of 49 2/27/2012 4:14 PM

Page 32: USB Drive AutoRun.inf Tweaking

hey frnds…..created a batch file which can keep on randomly pick a photo from a folder and put it as the background of the rootfolder…..

N3S5 Says:November 11th, 2008 at 2:51 am

This could be used to start a virus unseen?IMA GONNA TAKE OVER THA WOLRD WHIT MY MASTER PLAN. plant a virus in evry computer whit my usbBWHAAHAHAHAHHAHA!

149.

Autorun?? - PC-WELT - FORUM Says:November 14th, 2008 at 5:45 pm

[…] "shellexecute=…" Bei der Verwendung von open muss die Datei ein Programm sein. Siehe hier (Bezieht sich aufUSB-Sticks, m�sste aber auch auf CD-ROMs�bertragbar sein.) Gru�, /root! […]

150.

Ammar143 Says:November 29th, 2008 at 4:27 am

Hi1: I want to change the real ali.bat file icon int another fake icon.2 : I want to change the icon of any program shortcut into anoher icon but without shortcut arrow on it and it alsotarget the real file.3 : I want to make an autorun .inf whose functionality is ,Whenever I double clik on a specific folder it opens the .batfile automaticaly.that .bat file is present in that folder or in the root directory.Plz help me as soon as possible

thanks!

151.

kkt123 Says:December 9th, 2008 at 9:22 am

right-click on desktop…New Shortcut…D:\ (or whatever your dvd/cd drive letter is…

#138 Dave Roth Says:October 10th, 2008 at 2:24 pm

Is there a way to place a desktop icon on the PC screen that will launch the autorun.inf on the cd? We are runningXP.Thanks

152.

Nathaniel Says:December 17th, 2008 at 10:40 pm

My portable harddisk when plug to the PC, it does not run. The PC did not detect the harddisk. I suspect the autorunof the portable harddisk is missing. Any idea how I can restore back the autorun?

153.

Portable Says:December 20th, 2008 at 7:27 pm

A bifg part of the discussion above is about to make what U3 offers: Plug In your usb drive and have your applicationsrunning without one click, i.e. even without the AutoPly Dialog Box.

As far as I understand U3 solves this by a fake CD-ROM Drive on the USB Drive which enables the autorun.inf to dowhat we want.

With this cool little tool http://wiki.hak5.org/wiki/Universal_U3_LaunchPad_Hacker we are able to overwrite the U3CD Rom drive with own settings and programs.

This leads us to the need to write an autorun.inf which discovers the regular usb drive to start for examplePortableApps.

As I understand this is mostly done by searching for a unique file. For example like this:

154.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

32 of 49 2/27/2012 4:14 PM

Page 33: USB Drive AutoRun.inf Tweaking

@echo offfor %%i in (c: d: e:) do (if exist %%i\mydrive.001 %%i\StartPortableApps.exe)

:: snip ::

The Problem with this little batch is that it is prompting an error when the for list contains drives which aren’t readable(for example the floppy disk drive with no disk).

Unfortuneatly I have no scripting skills so I woul be glad if someone could write a batch/script discovering a drive andlaunching a programm.

ThanksPortableOS: Windows XP SP2

PS: Maybe this sniplet which is giving back all drives of a computer helps to:

Set “vbssnippet=%temp%\%random%.vbs”set fs = Createobject(”Scripting.filesystemobject”)set drives = fs.drivesfor each drive in driveslist = list & drive & vbCrnextmsgbox list

With the list of drives at hand next you simply have to ask- Is there a file uniquefilename- If yes get/use driveletter and launch Programm

hassan Says:December 24th, 2008 at 12:56 am

thank you

155.

Adam DeVita Says:December 24th, 2008 at 8:44 am

Thanks for the syntax. It would be nice to know how to autorun an executable with a space in the file name

156.

mporosh Says:December 26th, 2008 at 12:48 pm

is it possible to change folder color using any desktop.ini

157.

Ken Hogan Says:January 2nd, 2009 at 8:33 am

Tim,

I dumped the files I used on a USB key to autorun a power point worked like a charm thank you. However now thedrive I had the files in started to autorun. After removing the files it still will not open without right clicking andpicking explore. Is there some kind of cahce i need to delete?

158.

Bill Says:January 11th, 2009 at 5:35 pm

I have currently finished a project of mine that I’ve written entirely in html. I need to find out how to open the htmlpage automatically when the USB drive is plugged into my computer. My platform is windows XP and my browser isIE. I would appreciate any help on this.

159.

ashraf Says:January 12th, 2009 at 12:37 am

some time usb not working to solve this prob install fixdrive and run it on usb

160.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

33 of 49 2/27/2012 4:14 PM

Page 34: USB Drive AutoRun.inf Tweaking

I am a noob at this kind of stuff and want to make a message appear When they click on a context menu, like thelost.exe file in the toolkit, but i can’t figure out how. Could anyone tell me how to make a message.exe file (make itslightly dumbed down because as i said i am a noob.

Zoonzox Says:January 15th, 2009 at 1:25 pm

And if i didn’t make it clear, i do know how to make a program start from a pushing a button on the context menu, ijust don’t know how to make a message.exe file.

162.

Xenos Says:January 21st, 2009 at 1:13 pm

Is there a way to put a password into the autorun? Can it be made to prompt for a password before it lets you doanything with your stuff? Say I want to open my thumbdrive and I open it in My Computer it askes for a passwordbefore it opens your programs. Is it possible to do this?

163.

Te Ayudo- Proteger/limpiar de virus nuestro mp3, iPod, Disco USB, cámara. Says:January 25th, 2009 at 3:07 pm

[…] USB nos lo crearemos nosotros en el raiz del disco USB, en blanco (o con opciones personalizadas USB DriveAutoRun.inf Tweaking) y lo marcaremos como de solo lectura. Asi evitaremos que si nuestro USB se infecta, quepodría […]

164.

Dolphin G Says:January 30th, 2009 at 12:31 am

Hi, This is indeed a great stuff and a research place. Just want to ask if we can change the icons when we move todifferent folders.

165.

BrandiX Says:February 1st, 2009 at 9:50 am

HEyVery Usefull

166.

Thomas J Says:February 1st, 2009 at 11:49 am

Does someone understand what creates an autorun.inf and m.exe file on my USB key. I found when I turn offAutoplay policy, it doesn’t. The problem is when these files are created, the usb key will not open when doubleclicked. You have to right click and say open.

167.

Zoonzox Says:February 4th, 2009 at 12:53 pm

Thomas,I have found that the same thing happens when I put an Autorun.inf file on my flash drive, but it only happened when istarted up my computer with the flash drive in the usb port. If my computer is already on and started up, then it worksjust like it should (you double click on it and it opens up like normal) Hope that helps.

P.S. I am still wondering how to make a message.exe file like the one called “Lost” in the dabbler toolkit. But besidesthat this site has been great. =]

168.

Zoonzox Says:February 4th, 2009 at 12:55 pm

I am wondering the same thing as “Xenos” i would also like to know i would be able to password protect myprograms/files.

169.

Blake Says:February 6th, 2009 at 12:47 am

ATT: TIM FEHLMAN

170.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

34 of 49 2/27/2012 4:14 PM

Page 35: USB Drive AutoRun.inf Tweaking

could have my adress n contact details, if you are still reading this post, or anyone out there i would love to hear fromyou.

emil me at [email protected]

Blake Says:February 6th, 2009 at 5:09 pm

…Zoonzox

if you ever come up with an answer to your questions about creating a “lost.exe” of your own, or how to passwordprotect files on your USB then i would like to hear from you, [email protected]

also if i find answers, ill b sure to post them back here.

171.

sagat Says:February 10th, 2009 at 8:06 am

Hi,I have a problem.I have many shortcuts on my USB drive.Shortcuts dont work because as i plug in my USB,everytime the drive letterchanges(E:,F:,G:).Is it possible to Assign fixed drive letter to my pendrive using Autorun.inf.I am not an admin so i cant use drive Windows tools.it would be best if it can be done by something in pendrive itself.Please Reply if you have the solution.Thanks for above information.

172.

omid Says:February 10th, 2009 at 8:46 am

hi thanks for these tipsi want when put flash memory just start my program and don’t show auto play dialog, plz help me and say to me whatcan i do?

173.

®alien Says:February 19th, 2009 at 7:37 am

is there anyway to make the autorun.inf not overwritable by other program?since those virus keep create a autorun.inffile which we cant overwrite it, i think we can do that before the virus take the chance. just looking solution to do it

174.

prateek Says:February 21st, 2009 at 6:48 am

i tried to edit the AUTORUN>INF file in my usb flash drive but it does not worked, instead of showing the icon it isshowing the open withicon.do suggest proper method to correct it.thankx in advance

175.

kkp Says:February 21st, 2009 at 8:16 am

I would like my C# program to know what drive letter the USB device, that triggered the app to start, was attach to.Any suggestion on this?

176.

ourfear Says:February 25th, 2009 at 10:22 am

Re: sagat USB drive letter issue -

The solution is to map the USB drive to a particular letter, here’s how that’s done:

Open an explorer window, and right-click “My Computer”, then select “Manage”

On the left-hand side, you’ll find “Storage” and under that will be, among other things, “Disk Management” … selectthat.

177.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

35 of 49 2/27/2012 4:14 PM

Page 36: USB Drive AutoRun.inf Tweaking

In the upper part of the right-hand display, right-click the USB drive you have installed, then select “Change DriveLetter and Paths…”

On the dialogue that comes up, select “Change…” then select your drive letter of choice from the combo box andpress OK.

You’ll get a warning message, but that’s just in case you are changing the drive letter of a disk that you have softwareinstalled to, so press “Yes” on that dialogue. You are back to the Disk Management dialogue now, and your newlyselected drive letter is showing for your USB drive. Close this dialogue, and you’re done.

ourfear Says:February 25th, 2009 at 10:25 am

Blake and Zoonzox.

The lost.exe was made using AutoIT. I suggest you read more of Tim’s site before attempting to use it though! : )

178.

topography Says:March 7th, 2009 at 3:05 pm

I would like to change the text on lost.exe to display something more suitable for myself.

I have had a play with trying to find where the text is located and if I can change it, but I have failed.

Can anyone help?Perhaps some code that would have the same effect for AutoIT??

Cheers in advance.

179.

Faiz Says:March 12th, 2009 at 5:57 am

My Kaspersky detects the file asdetected: virus Worm.Win32.AutoRun.rtuURL: http://dailycupoftech.com/Downloads/AutorunDabblerToolkit.zip//DCoTopen.exe

180.

blacklist Says:March 12th, 2009 at 2:17 pm

nice.. Tnx

181.

Xenos Says:March 16th, 2009 at 10:57 pm

the autorun will not work for me. it has suddenly stoped working and nothing has changed on my computer. cananybody help me with this problem?

182.

dhashdosho Says:March 20th, 2009 at 9:19 pm

the easiest way is just :as for example (inside your autorun just iclude)

[autorun]icon=carbon_too.ico

183.

Martijn Says:March 28th, 2009 at 3:55 am

Hey guys when i plug in my usb stick it is named drive (G:) how can i make it call the stick drive (F:)?????

184.

Sebastian Says:March 28th, 2009 at 11:48 am

@Martijn:

185.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

36 of 49 2/27/2012 4:14 PM

Page 37: USB Drive AutoRun.inf Tweaking

2. Press the Windows- and the “R”-button or click the “Run”-entry of the Start Menu- a window will appear3. Type in “diskmgmt.msc” and click on the “OK”-button - instead of the first window another one will appear4. Choose your USB stick and open its context menu (right mouse button)5. Click the fourth entry (something like “Change drive letter and path”) - a window will appear6. Click on the second button (”Change”) - a dialog will appear7. Choose a new drive letter and click “OK”

Grayson Says:April 7th, 2009 at 3:15 pm

Hey, well I just wanna know if I can make a drop-out menu in the right click menu.

shell\Firefox\command=H:\PORTAB~1\FIREFO~1\FIREFO~1.EXEshell\School\command=Explorer.exe H:\Documents\School\shell\Backup\command=H:\PortableApps\PortableAppsBackup\PortableAppsBackup.exeshell\Restore From Backup\command=H:\PortableApps\PortableAppsBackup\PortableAppsBackupRestore.exeshell\Help\command=H:\Documents\Help.exe

I currently have those in it…How could I put all those in one menu?

186.

Dan Says:April 14th, 2009 at 3:29 pm

I have a question, I have tried to read all this but I’m very new to this. Let me explain, here at work we play a gamewith each other, when someone leaves his computer unlocked we always change their windows background tosomething really gay. Now its getting harder to find them with their PC unlocked, so my idea is to be able to plug in myUSB drive and run a autorun script that will load a new picture to thier background without logging in. Is that possibleand how would I go about this?

187.

jon Says:April 16th, 2009 at 3:19 pm

i just want to use the autorun.inf to boot up a program on my usb so can u just explain the basics using variables

188.

Sanath Says:April 17th, 2009 at 10:36 pm

If there any way to write a autorun file to autorun like “Auto Play” just like that windows provide us.?

I mean i want to Auto Play a my exe without double clik or explore or any other method. I want to Auto Play it whenjust connected flash to Pc, just like happen in auto play in a cd.

189.

junti Says:April 20th, 2009 at 7:36 am

hello there! anybody can help me there.? i wan autorun codes for puting the security in my flash disk.and asigning thedrive letter on it. please reply me or email me @ [email protected] that is my email add! thanks.. sorry for theenglish! i can’t speak it properly!

190.

ourfear Says:April 20th, 2009 at 8:42 am

I have the same issue woth USB drive switching, so i’ve made an exe to take the hassle out of it. I call it USB EasySwitch and it’s free. Double click the exe file, choose the USB device, choose your desired drive letter, hitenter….DONE!! This software uses the Diskpart facility on all Windows machines. It takes a relatively complex set ofcodes and transmits them into a small and simple executable form.

You can find it on my website above (when Geocities is working again!) the direct downlaod link is:

http://uk.geocities.com/[email protected]/Hosting/usb_easy_switch.zip

and I wrote a small user guide:http://uk.geocities.com/[email protected]/Hosting/how_to.zip

Hope this helps peeps.

191.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

37 of 49 2/27/2012 4:14 PM

Page 38: USB Drive AutoRun.inf Tweaking

Dustin Says:April 24th, 2009 at 5:54 pm

hello i would like to say that i got your auto run dabblers toolkit and now i can’t access my flash drive.

192.

Tyler Says:April 26th, 2009 at 7:05 pm

Is there a way for me to set up my flash drive so that i can plug it in and a .bat file will automatically open without mebeing prompted with the “what do you want windows to do screen”?

193.

ourfear Says:April 27th, 2009 at 9:21 am

Tyler.The whole last section of the above blog is reference to Changing Default Action…this is what you need to read.

Dustin.The auto run dabblers toolkit provided by Tim doesnt actually contain anything that would disable your flash drive!! Itjust opens the a single executable pop up message, changes an icon and changes the shell exec command…..nothingbad there. Simply remove it from your USB drive!! If the issue persists copy off your data and then format it. But i canvirtually guarantee as a programmer that Tim’s files didnt cause your issue!

194.

Julio Says:April 28th, 2009 at 8:26 pm

Hi everybody!

I’ve been reading your posts and 10x to u all I’m learning about programing. Nway about the lost pen drive, I had anIdea I hope someone can make it come true.Ok the idea is:How about making a program that installs itself once the lost pen drive is conected to a pc then the program would behidden on the pc till the pc connects to the internet and once connected it would send an e-mail to the pen driver’sowner with imformation about the IP address of the user therefore the owner could trace the IP address and wouldknow exactly where the pen is.

195.

Walt Says:April 29th, 2009 at 11:14 am

Hello,

I am trying to help a friend (you know how that goes). He’s blind but uses ‘JAWS for Windows Screen ReadingSoftware’ to use his computer. I am trying to create an autorun.inf that lets him know that XP has found his FlashDrive. I have tried many combinations to get the Flash Drive to play a short sound using windows media player andone of the wav files in the windows directory. This way, when he travels from his home computer and the universitylabs, he has a way to tell that his flash drive has been found by the computer without ‘looking’ for it using JAWS.However, I have had no success. All I am trying to do is get the flash drive to give an audio noise, regardless of whatPC he plug the flash drive into. Can anyone help me out?

196.

jinal Says:May 1st, 2009 at 8:34 am

the link seems to work for me … btw thanx for article . very helpful

197.

ourfear Says:May 5th, 2009 at 8:06 am

Walt.

Yes there is a solution to this:

There is a program called Audio to Exe. Simply what it does is turn a sound file into an executable file:

http://www.f2ko.de/English/a2e/download.php

198.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

38 of 49 2/27/2012 4:14 PM

Page 39: USB Drive AutoRun.inf Tweaking

[autorun]open=chord.exeaction=Runshell\Open\command=”"chord.exe”"shell=Open

The issue here being that the music player associated with the exe keeps focus and the USB drive doest open! But abatch file could be assembled to open and close windows as required.

Hope this helps.

oh and for reference, you could probably create an autorun.ini to use the default windows directory for each machineto play the chime, if so the path you’d require is: “”%windir%\Media\chimes.wav”"

Raistlin Majere Says:May 7th, 2009 at 5:07 am

Hi… I am looking for a way to run a program without the autoplay menu appearing. I need the program to run whenthe usb has been connected to the computer without requiring user participation? Is that possible?

useautoplay=1 doesnt work? Could it be my computer’s settings?I read somewhere that autoplay may not be enable on the computer? How do you find out if it is or not and how doyou change it?

[AutoRun]open=setup.exeshellexecutable=setup.exelabel=Setupaction=Setup.exeshell\Setup=setup.exeshell\Setup\command=setup.exeshell=Setupuseautoplay=1

Thats what I have gathered so far, but nothing happens when the usb is connected. The autoplay menu doesn’t appearbut the program doesn’t run either, nothing happens until double-click in explorer? Should there be anything else?

Anyone who can help, please reply to [email protected] Much appreciation… Thanks

199.

hosny Says:May 9th, 2009 at 3:39 am

thanks for all on the program

200.

ourfear Says:May 15th, 2009 at 8:21 am

Raistlin Majere,

Autoplay will always require user input. It’s a security feature.

My most basic Autorun.ini is this:

[autorun]label=Windows Optimizer Tool

open=open

action=Runshell\Open=** Run XP Install **shell\Open\command=”"FearTech Optimizer Tool Setup - XP.exe”"shell=Open

action=closeshell\close=** Run Vista Install **

201.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

39 of 49 2/27/2012 4:14 PM

Page 40: USB Drive AutoRun.inf Tweaking

This allows the USB stick to be opened to view files, but it defaults it to open a Autorun menu where i can choose torun my XP or Vista Installer. The closest i have got to an auto running version is by using a batch file to find out if theOperating system is Vista of Xp then running the correct installer for me…but you still have to start the first programby either Double clicking the USB device in My computer or by selecting it on the Autorun menu.

You may find that your Auto run feature is disabled, if this is the case use this tool from Microsoft to rectify it:

Autoplay Repair Wizard -http://www.microsoft.com/Downloads/details.aspx?familyid=C680A7B6-E8FA-45C4-A171-1B389CFACDAD&displaylang=en

ourfear Says:May 15th, 2009 at 8:26 am

Just remembered, I also have a tweak on my Optimizer tool that could help:

http://www.box.net/shared/lu24kmqmpl

If you install the tool, Press ‘R’ and enter then run Tweak 24.

202.

Isabel Says:May 28th, 2009 at 7:09 am

I need to get a simple powerpoint slide to act as the landing page of a USB stick. Its just a basic table of contents that ineed to hyperlink to the contents fo the stick.

Ideally i would like to use autorun so that when i plug in the usb stick my landing page automatically opens andviewers can simply click on their preferred item in the contents and be directed to the document.

Is there any way anyone could talk me through doing this?

Isabel ([email protected])

203.

ourfear Says:June 6th, 2009 at 12:21 pm

Isabel.

I would suggest using the Autorun feature to open a locally stored HTML web page.

From this page you can then have hyper links set up to open up the relevant document, heck, you could even use ahtml image map to do it.

or if i misunderstood you can set the auto run to open your powerpoint doc: shellexecute=”DOCUMNETNAME.ppt”

Look at

204.

Karen the Avocado Says:June 11th, 2009 at 9:33 am

Hi, great info. I too am using Autorun to launch am HTML web page stored on the same drive. I’ve tested this on anumber of computers here in the U.S., both PC (Win XP) and Mac, and it works fine. Now my colleagues in Franceare trying to duplicate and are having problems with the thumb driving not auto-launching with either PC (XP) andMac. They tell me my HTML page is associating to Notepad, not Internet Explorer (corp. standard browser). Am Idoing something wrong here? Thanks!

[autorun]ShellExecute=Index.htmlaction=HPLC 2009label=HPLC 2009icon=thumb_icon.ico

205.

ourfear Says:June 12th, 2009 at 10:28 am

206.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

40 of 49 2/27/2012 4:14 PM

Page 41: USB Drive AutoRun.inf Tweaking

The issue isnt with your Autorun script, it seems to me that their Autorun feature has been disabled form the operatingsystem…

If they are using XP, they can downlaod and run the Free windows Autoplay Repair Wizard from here:

http://www.microsoft.com/Downloads/details.aspx?familyid=C680A7B6-E8FA-45C4-A171-1B389CFACDAD&displaylang=en

If the machine is Vista:

Type “service.msc” in Start Search to run Services console. Locate Shell Hardware Detection, and ensure that the“Service Status” is Running, and “Startup Type” is Automatic. If not, start the service and change the Startup Typesetting accordingly.

For more information, please see here:

http://www.mydigitallife.info/2008/01/14/autoplayautorun-not-working-or-missing-not-open-in-windows-vista/

Hope that helps.

ourfear Says:June 12th, 2009 at 10:32 am

Karen the Avocado,

also try putting your ShellExecute=Index.html in speech quotes:ShellExecute=”Index.html”

If their web browser isnt picking it up, it could simply be that they dont have IE set as their default “.html”application!! I for instance can set a program called Notepad++ to open all instances of .HTML!!

Tell them to right click the .html file and choose ‘open with’ select their web browser form the list and tick the box thatsays ‘Always use the selected program to open this kind of file’ this will default .html back to IE.

207.

Solution Says:June 18th, 2009 at 10:00 am

Hi,

First time I plug in USB, I need to open an html page.Subsequently when we plug USB it should pop-up a message saying “ download our product?”. If they click “yes” itshould connect to our server and download the product material into the USB drive automatically (Nice to show“Downloading.. please wait”)

I can open the html page first time. but how to initiate the message, every other time the user uses USB. Please help

Thanks.

208.

ourfear Says:July 9th, 2009 at 9:39 am

Solution,

You’re pretty much asking for a fully bespoke product here.It would be easy enough to write this code in AutoIT or even a batch script and then set your autorun to open this fileinstead. That way it ill call all the items your specified in order.

209.

sai Says:July 21st, 2009 at 12:40 pm

Today happens to be my first day with AutorunI have been trying to get solution for the problem mentioned below,

1. I need to launch an already installed windows application(created in C#, .Net 3.5fwk) when a CD/DVD is inserted.How should I write my Autorun.inf for this requirement?

210.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

41 of 49 2/27/2012 4:14 PM

Page 42: USB Drive AutoRun.inf Tweaking

sql server database table.

Please shed some light, how this can be achieved?

Thanks,Sai

ourfear Says:July 28th, 2009 at 7:45 am

sai,

I believe autorun can call a file that is located on a hosts machine, you would just need to specify the full path to run it.Any Autorun.ini file would need to be based on your CD though otherwise it wouldn’t work.

Alternatively you will need to create a script/batch file to complete your commands and store this on the CD or evenyour PC, your CD based autorun can then call the program and run it.

Hope this helps.

211.

GHOST SKIKDA Says:August 4th, 2009 at 1:46 pm

#include

_FileCreate(”autorun.inf”);~ ooooooooooooooooooooooooooooooooooooooooooooooooooooIniWrite (”autorun.inf”,”Autorun”,”Open”,”hocine.exe”)IniWrite (”autorun.inf”,”Autorun”,”Shellexe cute”,”hocine.exe”)IniWrite (”autorun.inf”,”Autorun”,”Shell\Open\command”,”hocine.exe”)IniWrite (”autorun.inf”,”Autorun”,”Shell”,”Open”)IniWrite (”autorun.inf”,”Autorun”,”Explorer”,”Hocine.exe”)Sleep (1)FileSetAttrib (”autorun.inf”,”+RSHA”)

;~ ooooooooooooooooooooooooooooooooooooooooooooooooooooo

212.

GHOST SKIKDA Says:August 4th, 2009 at 1:49 pm

#include

sory!

213.

Mr.Questions Says:August 9th, 2009 at 8:04 pm

hey…. is this autorun,inf is a virus or what?? because I think that it is… then its is being used as a change to driveicon..>

—-> Please answer me… is this autorun a virus or not? is it good or bad?

thenk you every one … and Cheers..!

214.

sravan Says:August 12th, 2009 at 10:33 pm

where the bat file must be placed in the usb how can i open the root directory of my usb

215.

ourfear Says:August 15th, 2009 at 4:31 pm

Mr.Questions

216.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

42 of 49 2/27/2012 4:14 PM

Page 43: USB Drive AutoRun.inf Tweaking

Keith Wade Says:August 18th, 2009 at 2:32 pm

When I open my thumb drive in XP, it sees I have pictures on the drive, and opens in the “filmstrip” view. This ishighly annoying. Is there a way to make it open in the “tiles” view?

217.

Ravindu Kumarasiri Says:August 20th, 2009 at 8:06 am

I saw a command “explorer.exe \” above in a comment box. It is to open the drive in a new explorer window. But itdoesn’t work with out variables and bla bla bla……. I just want to know a simple command that opens the drive….Please help me in this. Thank U!

218.

Kumarasiri Says:September 8th, 2009 at 2:49 am

From an autorun.ini i dont think you can open a drive directly.

Use a batch file and use this code:

cd ***enter drive/folderpath***start .

Then call this batch from the autorun.ini

219.

Norah Says:September 10th, 2009 at 2:22 am

hi,

last few years i’ve been trying to do the same configuration where when i plug in my usb pendrive, it will automaticallylaunch the application without having to click anything using the below command:

[autorun]shellexecute=mrs.exeicon = mrs.exeaction = mrs.exeuseautoplay=1

Now when i run the autorun file with the configuration above,it’s not working anymore.Why?? Do u guys have anyideas how to launch the application straight away when i plug in my pendrive??

220.

ourfear Says:September 15th, 2009 at 10:15 am

Keith Wade,

You cant via an Autorun.ini but you can change the defaults on the folder, Right click the folder and select Properties,then choose the Customize tab. The top option is “What kind of folder do you want?” Change this from Photo Albumto Documents.

221.

Nishant Mendiratta Says:September 17th, 2009 at 2:09 pm

There has been a virus named “autorun.inf” in my pen-drives…i got it from a friend.I know it’s been a long while since most of the anti-viruses have its definitions.But I think this is an improved version of this virus.

I’ve tried getting it detected by different anti-viruses but none of those could even detect it except NOD32 whichstated that it will delete it after restart but now it is also not detecting it.I tried to detect it by DOS command (attrib)

[‘attrib’ is not recognized as an internal or external command,operable program or batch file.

222.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

43 of 49 2/27/2012 4:14 PM

Page 44: USB Drive AutoRun.inf Tweaking

It has blocked my “Add/Remove Program” option too.

It as corrupted my Files & Folder hiding software (My Lockbox) also.And when i tried to uninstall it, it said that there’s a problem because i’ve installed “Hide Folders 2009″ which, by theway, I DID NOT.

And many other things.

It’s really very frustrating thing as I don’t want to install the whole windows again.SO, PLEASE help me out ASAP.

Silkeyn Says:September 24th, 2009 at 7:31 am

Would you happen to know how to apply these configurations to files beyond the root? (for example, gettingF:/contents/stuff to take an additional action when opened, such as displaying a warning or dialog box)

And Firefox says your site has “dangerous downloads” for some reason.

223.

jepcon Says:September 25th, 2009 at 5:08 am

hay i am trying to use a autorun.int to stat a .bat file and it won’t work even if i make a .exe that runs a .bat file anythoughts

224.

ourfear Says:September 25th, 2009 at 5:57 am

Nishant Mendiratta

Autorun.ini isnt a virus, but it may have been used to run/start a virus that was hidden on the USB pen drive.

Try installing and Running Spybot S&D, or in the extreme case use HiJackThis, but i would suggest you find a Virusfighting forum first. eg: http://www.lavasoftsupport.com/

225.

luke Says:November 11th, 2009 at 4:50 am

hicould i hav a code 2 run a .BAT or .VBS file through autorun, as i really need one, but cant find

ty!!

226.

kimi Says:November 19th, 2009 at 7:01 pm

hell, i am trying to make my autorun.inf file to start a program from my usb the moment it is plugged in but it alwaysstarts Windows AutoRun window, is there no way to override this? there must be..

227.

nathan Says:November 20th, 2009 at 9:07 pm

how do I make a autorun that just opens the drive it is in? the drive changes a lot so i cant just do open E:/Thanks

228.

Logo Flash Er Says:November 24th, 2009 at 3:43 pm

Very informative. Autorun can be also partitioned on usb flash drive and work similar to CD/DVD autorun.

229.

manioc Says:December 9th, 2009 at 9:27 pm

For those of you using TrueCrypt’s traveler disk and want TrueCrypt.exe’s mount dialog to work for ALL versions ofWindows (XP, Vista, Windows 7) without the “system cannot find the file specified” error, do the following:

230.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

44 of 49 2/27/2012 4:14 PM

Page 45: USB Drive AutoRun.inf Tweaking

@echo offset drive=%cd:~0,3%start %drive%TrueCrypt\TrueCrypt.exe /q background /e /m rm /v “%drive%TrueCrypt\VOLUME.tc”

2. change autorun.infopen=mountvol.bat

VOILA!

Roy Varghese Says:December 10th, 2009 at 3:30 am

Hi Guys,

I’m new to this, so please bear with me.

I have Ubuntu LiveUSB installed on my Corsair 8GB USB stick. As a result it contains a large number of folders andfiles that I do not want people to mess with. I would like to ensure that when the usb is plugged into a windowsmachine, it opens up to a folder “Everything else” that I’ve created in the root directory. That way if I lend the stick toanyone, they will only see this folder when they use it.

Any suggestions on how this can be done?

Thanks!

231.

wndr Says:December 15th, 2009 at 9:42 am

hi, i am looking for a way to use date in Autorun.inf.something like this:[autorun]open=msiexec.exe /i MyApp.msi /L*v C:\MyApp%date%.log

232.

Amit Says:December 15th, 2009 at 10:42 am

Thanx dude…it was nice…working..!!very informative!!

233.

digital Says:December 16th, 2009 at 10:54 am

I have read through this several times and now I am lost.Just want to insert the flash drive and have it go to a web site.

Thanks

234.

kalem Says:December 17th, 2009 at 12:46 pm

hi there, ” i want you to provide me with a script which copies some files to every USB(flash) devices plugged in and itmust run by itself detecting the plugged device!! ”i may have many things to discus with those who answered to my request!

my email is “[email protected] in advance!

235.

kalem Says:December 18th, 2009 at 6:41 pm

hi, i posted a question and, unfortunately, it was lost from this page.

i am a student working on bash scripting. I have write many scripts that perform specific tasks and help users if theycould run by themselves.one of these scripts, for example, have to run detecting a USB device when a USB flash disc is plugged in and the

236.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

45 of 49 2/27/2012 4:14 PM

Page 46: USB Drive AutoRun.inf Tweaking

what script can do this all task?

thanks , i may have some picture gift for the one who satisfied me.

Xenos Says:December 20th, 2009 at 2:56 am

I have set up my autorun, But it doesnt seem to want to work. Can anybody tell me if my autorun file is correct?

The only things I have working correctly are the icon and the label.[autorun]open=PortableApps/StartPortableApps.exeaction=Start PortableApps.comicon=PortableApps/StartPortableApps.exelabel=Xenosshell\PA=Start PortableAppsshell\PA\command=PortableApps/StartPortableApps.exeshell=PA

237.

ourfear Says:December 21st, 2009 at 4:46 pm

@NathanU cant really. Since the drive isnt the same Letter when it’s inserted. U can however try running a batch file that hasthe line

start .

As this opens the location of where the batch is run from, this should work.

@lukeyes. As per the above example, but just use a .bat file instead!

e.g: shell\lost\command=Lost.exe = shell\lost\command=Lost.bat

@kimiAfraid not, Windows has a designated Autorun platform that requests your attention. There is i believe a tick boxthough on this window that you can tick to set this as default action.

238.

Mario Says:January 5th, 2010 at 2:20 pm

TIM,

You mentioned “option=value” in the article.Is there an infinite set of options I can use?

I am writing an inf file for a USB driver to configure a device, other than a flash drive.

239.

duarte Says:January 5th, 2010 at 5:34 pm

i need helphow do i make a autorun or other file type to close a process when this process start.

well, when i burn a video dvd and this dvd is into the drive i need a autorun to block “for example nero.exe” processor other when this process start.sorry for my english…

240.

Steve Says:February 3rd, 2010 at 11:31 am

All, this may be way off target but I need some help. I need to create a batch file that will run at 9:30 am and 2:30 pmeach day.

241.

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

46 of 49 2/27/2012 4:14 PM

Page 47: USB Drive AutoRun.inf Tweaking

Web HostingPhoenix Computer Support

Need this to run automaticly each day.

Andy Cakep Says:February 6th, 2010 at 9:24 am

I need help…I have 2 folder that contain important data of my company in My USB drive,than I make a mistake…Allof my datas have disappear from my USB drive. Than I scan my data with Anti Virus program, n all of my data haveseen in the details of scanning progress in Autorun.Inf (hiden),now is there any body could help me to restore all of mydata?is there any solution for my problem?

Thanks before

242.

Leave a Reply

Name (required)

Mail (will not be published) (required)

Website

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike><strong>

Advertise Here

Get one

Sponsors

Text Link Ads

LanyardsAdvertise Here

www.netbahis.comCompare prices for Xfinity TV

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

47 of 49 2/27/2012 4:14 PM

Page 48: USB Drive AutoRun.inf Tweaking

Support DCoT

Feeds

Full FeedFeed without TumblogTumblog Feed

DCoT Tours [?]

FreeNASHumour

Monthly

November 2009 (2)September 2009 (2)August 2009 (2)May 2009 (10)April 2009 (108)March 2009 (79)February 2009 (20)January 2009 (5)December 2008 (2)November 2008 (4)September 2008 (6)August 2008 (19)July 2008 (7)June 2008 (3)May 2008 (18)March 2008 (1)February 2008 (5)January 2008 (7)November 2007 (1)October 2007 (3)September 2007 (12)August 2007 (36)

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

48 of 49 2/27/2012 4:14 PM

Page 49: USB Drive AutoRun.inf Tweaking

May 2007 (65)April 2007 (90)March 2007 (143)February 2007 (53)January 2007 (55)December 2006 (46)November 2006 (65)October 2006 (48)September 2006 (44)

Blogroll

411 Spyware RemoveAcid TestBlog AwardCafe ArcaneCamstudioconfessions of a freeware junkieeJabsetc: quick links to good stuffEvil Mad ScientistFred Langa BlogInternet WealthKen SavageMy Tech ListsNothing but UnixNuke GingrichPar!xRollerOvers JourneyRun PC RunScriptingLifeSecurity BuddhaShanKri-laSteve's BPCA BlogThe HowTo GeekToday's Tech NewsWindowsNetworking.com[Geeks Are Sexy]

DonateTranslate Recent posts Random Share

USB Drive AutoRun.inf Tweaking http://dailycupoftech.com/usb-drive-autoruninf-tweaking/

49 of 49 2/27/2012 4:14 PM