Friday, November 6, 2009

make a autorun cd

I know that usually fancy things like autoruns are used in windos but I wished to make the same thing in linux also so you could find details for WINDOWS autorun creation in this post and I will soon post the same LINUX style

WINDOWS autorun

There are two main types of autorun file that you could use:

Autorun using the 'open' command

The open command is compatible with any PC running Windows 95 or later (although it is possible to manually disable the autorun feature on any computer, so if someone cannot view your autorun application then this may be a reason). However it can only be used for opening executable files ending in .exe such as Flash presentations, it cannot be used for opening documents such as Word files, PDFs or web pages. To open documents rather than executable files using autorun please look below.

The text file is called autorun.inf

Autorun using the 'shellexecute' command

The shellexecute command is more flexible than the open command and will allow you to open nearly any file on a PC in its native application, so can be used for PDFs, Word files, web pages and movies where the open command would not work. 

If for example the file to open was called index.html and it was in a folder called website then the second line of the autorun file should be shellexecute=website/index.html

Notes about autorun files

Do not use any spaces in the file name of the document or exe file that you are linking to, always replace spaces with underscores (e.g. my_presentation.pdf ), otherwise the autorun will not work.

The autorun.inf file should always be in the top level of the CD and not placed within a folder.

For PowerPoint presentations you do not need to create an autorun file and should use the autorun feature built-in to PowerPoint.

Enabling AutoRun on your computer

Feb 24, 2009: This Microsoft KB 967715 article has the latest information on AutoRun - see the More Information section .

To test AutoRun you need to have it enabled on your computer.  A registry setting can be used to disable AutoRun.  Click Start+Run then type in regedit.  Select Edit+Find and type in NoDriveTypeAutoRun.  This value should be found in this key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer .

The NoDriveTypeAutoRun value should be hexadecimal 95 if AutoRun is enabled on all CDs, or B5 if disabled for CDs.  (If you want to test AutoRun on a floppy disk, set this value to 91.)  You may need to change more than one instance of NoDriveTypeAutoRun in the registry.  You usually need to reboot for a new value to take effect.

In Windows 95/98/Me the NoDriveTypeAutoRun value is displayed as 95 00 00 00.  In Windows NT4, 2000 and XP this value is displayed as 0x00000095 or hexadecimal 95.  If you modify the NoDriveTypeAutoRun value make sure it is still in the correct format.

More ways to disable AutoRun

There are two other - uncommon - ways of disabling AutoRun.  The NoDriveAutoRun registry value is in the same key as NoDriveTypeAutoRun.  Each bit represents each drive, so hexadecimal 01 disables AutoRun for floppy drive A, 04 disables AutoRun for drive C, 10 disables AutoRun on E.  Values can be combined, so 19 disables AutoRun on E, D and A.

If either NoDriveTypeAutoRun or NoDriveAutoRun specify that AutoRun should be disabled for a drive, then it is disabled for that drive.

Finally, programmers might like to know that AutoRun can also be disabled by the program that controls the foreground window by handling the "QueryCancelAutoPlay" Windows message.  Please consult the Microsoft documentation for more details.


No comments:

Post a Comment