Articles

How to create an autorun USB drive by yourself, which works on any Windows

How to create an autorun USB drive by yourself, which works on any Windows

It is known that Microsoft has turned autorun off for all USB devices in Windows 7 and higher. (more details : AutoRun changes in Windows 7).

As we previously wrote, the only way left for users to have the USB autorun functioning on any computer is to use a special USB drive that is interpreted by Windows OS as two devices: one looks like a typical CD-ROM, while the second one is a flash USB drive itself.

For some reason, USB drives with such a function are very hard to buy now. However, if you are technically savvy, and you know how to find information in the Internet, with a bit of luck you can make such a flash drive yourself.

In this article we tell how we were able to make a USB drive featuring a CD-ROM volume and the autorun function from a conventional flash stick purchased in the nearest shop. We didn't mean to prepare an all-around comprehensive guide, but following our steps you can try to do the same with your own USB device. Also, we recommend purchasing the same or similar flash-disk to increase chances of the successful outcome.

DISCLAIMER: YOU PERFORM ALL ACTIONS WITH FLASH DRIVES COMPLETELY AT YOUR OWN RISK. WE ARE NOT RESPONSIBLE FOR ANY HARDWARE OR DATA DAMAGE THAT MAY RESULT FROM YOUR ACTIONS.

Let's get into the theory a bit. The bulk of flash-drive manufacturers use third-party chips/microcontrollers. And some controllers allow creating a separate partition on the disk that is identified by the OS as a CD-ROM device. This option is hidden, but as we will demonstrate below this is real, and can be done by low-level formatting of the disk with special tools offered by the manufacturer of the controller. Apparently, each controller should use its own software.

So, our task consists of the following steps:

  1. Determine the manufacturer and modification of the chip/controller of the flash drive.
  2. Find and download the specialized tool by that manufacturer.
  3. Create an iso-image for our future CD-ROM partition with our app autorunning on USB plugged in, and try to create a CD-ROM partition on the USB stick using the manufacturer's utility.
  4. If the controller of our USB device allows creating a CD-ROM partition, we will end up with a disk indentified by Windows as two disks: CD-ROM and usual flash drive. Autorun from CD-ROM is permitted in Windows, so after we insert the USB disk to a computer, our application runs automatically.

Since the majority of chips/microcontrollers are manufactured in China, obtaining any additional information about them becomes a real problem - not many of us can actually speak or read Chinese. We weren't able to locate thorough English information on the topic, so this article refers to a good Russian forum - all necessary information and files were retrieved from there. We recommend to use the Chrome browser to automatically translate those forum pages. Note that controllers get constantly updated, so may be you will need a newer version of manufacturer's software than the one mentioned in the article.

Now let's describe our sucessful experience on creating a USB drive with a CD-ROM partition that supports autorun in Windows OS.

For our tests we took two flash drives labelled Kingston DTSE3 8Gb and Kingston DataTraveler 2Gb :

We successfully created a CD-ROM partition on both disks. However, it is fair to say that we wasn't able to do that on some of other USB drives.

1. Determine the manufacturer of the chip/controller. To identify the type of a controller we used the ChipGenius utility (you should use the version 4.0 or higher). Insert the USB disk to the computer and run the executable of the program. All utilities should be run as administrator.

A dialog will open - select our USB disk and write down or memorize the Chip Vendor and Chip Part-Number fields. In our case they are: Chip Vendor = Phison, Chip Part-Number = 2251-67.

Note, these fields may turn out to be empty or senseless for your USB device. This could mean that the type of your controller cannot be determined with this utility. In that case we recommend to determine the model of the controller using the VID and PID fields (in our example they are VID = 0951, PID = 1665). We cannot provide a general rule of thumb how to do this, but you can refer to the knowledge base maintained by users of this forum http://flashboot.ru/iflash/ or Google around. Also, you can dismount the cover of the flash drive and see the label of the chip yourself, but may be this way is too radical while not even 100% effecient.

2. Ok, let's assume we determined the name and the type of the chip. Now we need to find an approriate utility from the manufacturer. We recommend to refer to this knowledge base maintained by users:  http://flashboot.ru/files/. Note that for modern chips you often need the latest version of software, but you still can try several available options in case of failure. We chose the utility for Phison chips - Phison_MPALL_v3.60.0B

Extract files from the archive into a folder and launch GetInfo.exe to obtain information about our disk.

We enter the drive letter and click the Read button. This will display information about our USB device. We recommend to save these settings to a file so you could restore them later if something goes wrong. We need the following values from below :  ICVersion - the exact version number of the controller and FC1-FC2 - the firmware type.

Note, that if you determined a wrong type of the controller on previous steps, the program will return an error.

3. Now it is time to prepare a CD-ROM image that we plan to record to our flash drive. We will use Autoplay Menu Designer for this.

a) Open the Example1 project.

b) Build a test autorun menu.

c) Export the result to an iso file.

d) Save the iso file to the hard drive - our ISO image is ready!

4. Then, run the MPParamEdit_F1.exe file from the Phison_MPALL_v3.60.0B folder to configure our future flash disk:

At this step we should set the following values :

Controller - the type of the controller of our flash stick;
FC1-FC2 - firmware type ;
No. of Partition - 2 ;
Mode - 21 ;

Partition 1 settings :
    - turn on the CR-ROM radio button.
    - CD-Rom image - select the iso-file we prepared on the previous step.

Partition 2 settings :
    - turn on the Removable Disk radio button

Click Save. The settings are saved into the MP.ini file in the current folder. We're done with the settings, so jump to the next step - disk formatting.

5. Execute the MPALL_F1_8400_v360_0B.exe file and in the opened dialog click the Update button. We should see our flash disk on one of 16 slots available.

Click the Start button. The first stage is formatting.

As soon as formatting is done, remove the flash disk using Safely Remove Hardware and Eject Media capabilities of Windows.

Then, plug it in again. Click the Ok button.

If a Windows format disk dialog appears - click Cancel.

Wait until the utility finishes its work.

Now the USB drive is created successfully.

Close the program. However, before you remove the USB drive, you should run Task Manager and make sure the MPALL_F1....exe is shutdown. You should end the process manually if it didn't finished normally.

Finally, eject the flash stick and re-insert it again. Now our drive is represnted by two volumes and our Example1 menu automatically runs as long as autorun is enabled in Windows.

Now, as you have sucessfully built an autorun USB disk, you can make another one by repeating the above procedure over and over with USB drives of the same series. Although this isn't a one-stop solution, you can use this guide to autorun applications from USB drives.