Wednesday, May 30, 2007

Is it possible to show documents automatically with Autorun.inf?

Is it possible to show documents automatically with Autorun.inf?

In newer windows it is possible, but in older Windows it is not. There is a command named SHELLEXECUTE that can open documents if the filename extension (.doc, .avi, .pdf etc) is registered in the system.

But if you distribute a commercial application that should work in all Windows versions it is recommended not to use this command because this command will not work in for example Windows 95 or 98. Use instead a document launcher application that works in all Windows versions.

A document launcher application will take a path to the document file as a parameter and open the dokument by calling proper functions in the system. An example of a document launcher application is SamLogic Autorun Creator.

In Windows XP there is also a new technology, called AutoPlay, that automatically opens documents on CD's and DVD's. AutoPlay will detect content such as pictures, music, or video files and then automatically launch an application to play or show the content. This technology is not available in older Windows

No comments: