摘要 |
A method and system for automatically running a program stored on a medium upon detection of insertion of the medium into a drive are provided. The operating system periodically polls the drive regarding the status of the drive. After receiving a response from the drive regarding the drive's status, the operating system determines whether the drive's status has changed. If the drive's status has changed, the operating system broadcasts a message indicating the change in the drive's status. When the shell receives a message from the operating system indicating a change in the drive's status, the shell determines whether the change in the drive's status indicates that a medium has been inserted into the drive. If the change in the drive's status indicates that a medium has been inserted into the drive, the shell searches for a predefined file on the medium. The shell then runs a program stored on the medium that is specified in the predefined file. Thus, the running of the program on the medium is performed without any action being required on the part of a user.
|