Dyskusja: autorun.inf
Podgląd pojedynczego posta
Stary 12.06.2002, 07:52   #20
SP4UBW
Nowy na forum
 
Data rejestracji: 13.05.2002
Posty: 3
SP4UBW w tym momencie nie ma Reputacji dodatnich ani ujemnych <0  pkt>
Kilka info o testowaniu pliku autorun.inf bez potrzeby nagrywania CD, wystarczy zwykła dyskietka..


Q: How do I test autorun.inf files without wasting CD's?

A: It is rather easy to test autorun files from floppy disks or other removable media, but to do so will require a change in the standard registry settings for your computer.

Visit How to Test Autorun.inf Files for the official Microsoft technical information on this topic.

Now, here's the full explanation and step-by-step tutorial for making the changes to your registry to enable floppy autoplay.

1) From the start button menu, select 'run' and type in regedit. This will launch the registry editor.

2) Back up your registry! Not required, but it's always wise to make a backup before changing anything in the registry. From the Registry Editor 'Registry' menu, select 'Export Registry File...'. Give the file a name and save it to the location of your choice. (Should you later need to restore the backup file, use the 'Import Registry File' from the same 'Registry' menu.)

3) Using the same folder tree browsing that you are hopefully familiar with from Windows Explorer, ftp applications, etc., you will need to locate the following entry in your registry:

HKEY_CURRENT_USER->Software->Microsoft->Windows->CurrentVersion->Policies->Explorer->

For your future information, the entries on the left depicted as folders are called registry keys.

4) The area on the right of the Registry Editor will show a list of the various registry values for the 'Explorer' key. The only one you are interested in is 'NoDriveTypeAutoRun'.

The entry for this value varies by operating system and according to which drives currently have autoplay enabled.

For the standard system setup of having autoplay enabled on the CD drive(s), you should see the number 95 in the 'NoDriveTypeAutoRun' value entry. For the standard setup without cd autoplay, this value is normally B5.

On windows 95 and higher, the default with cd autoplay for 'NoDriveTypeAutoRun' is 95 00 00 00.

Don't worry if the value is not 95 or B5. In the case of a non-standard setup, you will wish to make a note of the current value and use the chart given later in this tutorial to create a new value based off that value rather than 95.

5) To change the 'NoDriveTypeAutoRun' setting, you will need to understand a bit about binary and hex values.

To understand this topic clearly, you will need to use the calculator that comes with Windows. From the start button menu, select 'run' and type in calc and hit enter. This will launch the Calculator application.

5a) From the Calculator 'View' menu, select 'Scientific' so that you have the option of displaying a value in both binary (bin) and hexadecimal (hex). Other numerical conversions are available, but these will not be needed.

5b) Set the Calculator to hex and enter 95 (the default setting for 'NoDriveTypeAutoRun' with the cd set to autoplay). Now, switch the Calculator to bin mode. It should display 10010101.

To explore what this number means, you will need to look at it backwards. In other words, the bit order for this number is 7,6,5,4,3,2,1,0.

95 (hexadecimal)
10010101 (binary)
76543210 (bit order)

The chart from Microsoft gives us the following details:
Drive Type = Bit Number
DRIVE_UNKNOWN = 0
DRIVE_NO_ROOT_DIR = 1
DRIVE_REMOVABLE = 2
DRIVE_FIXED = 3
DRIVE_REMOTE = 4
DRIVE_CDROM = 5
DRIVE_RAMDISK = 6
Unspecified Reserved Type = 7

Using the standard boolean (true/false) system, a value of 1 for a bit means the value is true and a value of 0 means it is false.

But, since the registry value is called 'NoDriveTypeAutoRun', you must regard your settings as being:
1 = true = yes, I do not want that drive to autorun.
0 = false = no, I do want that drive to autorun.
Again, this is sort of backwards.

Now, looking at the chart and the binary 10010101 (hex 95) value, you can see that autorun is enabled (0) on bits 6, 5, 3, and 1. This means that drives of type DRIVE_RAMDISK, DRIVE_CDROM, DRIVE_FIXED, and DRIVE_NO_ROOT_DIR will autorun.

Autorun is disabled (1) on bits 7,4,2, and 0. This means that drives of type Unspecified Reserved Type, DRIVE_REMOTE, DRIVE_REMOVABLE, and DRIVE_UNKNOWN will not autorun.

Note: the drive type I am referring to as 'Unspecified Reserved Type' is not actually a type of drive. This is a place holder Microsoft has reserved for future development. It is specified that the 7th bit must always be set to 1.

5c) Floppy drives are removable drives and therefore are of the type DRIVE_REMOVABLE. This drive type corresponds with the 2nd bit in the binary number value and you will want to set it to 0.

6) The easiest and safest way to determine the value for the 'NoDriveTypeAutoRun' entry is to enter 95 (the default setting including cd autoplay) into the Calculator in hex mode. Switch to bin mode and Edit->Copy this value and paste it into a text editor (or write it down). Clear the Calculator (C).

Now, as indicated in above (5c), you need to change the 2nd bit from a 1 to a 0 to enable autoplay on floppy drives (and other removable drives). So, 10010101 becomes 10010001.

With the Calculator in binary mode, enter 10010001. Switch to hex mode and you will discovery that this binary value is equal to 91.

Note: If your system did not start with a value of 95, you will want to go through the same steps to create a custom value based off the number from your system and not 95.

7) Time to enter this new value into the registry. In the Registry Editor, right click on the 'NoDriveTypeAutoRun' entry on the left (as navigated to in step 3). Select 'Modify' from the menu (or click on 'NoDriveTypeAutoRun' and 'Edit' menu->'Modify').

8) In the resulting Edit Binary Value box, enter 91 (the value from step 6) and delete the '95' ('B5' or other value may be in this place as indicated in step 4) leaving the additional 00 or other values in place. Click on the 'OK' button.

9) After reading the rest of this FAQ, close down the Registry Editor and Calculator and restart your computer.

10) Autoplay from floppy disks is not exactly the same as cd autoplay. Most floppy drive controllers do not notify the system when a new floppy has been inserted in the drive and so the auto in autoplay, in this case, is a bit of a false claim.

poniżej druga częśc (nie zmieściło się do jednej wiadomości.
SP4UBW jest offline   Odpowiedz cytując ten post