I am working on a project that is getting ready to create deployment
CDs for distribution. I don't have the time to create a executable to
put in the open command (though I from the errors I am getting, I
believe it would not work either).
I added the following autorun.inf file to my test CD-RW disc:
[AutoRun]
action=Autorun
open=explorer \.
icon=icons\Icon_32.ico
label="My App Suite"
shell=ViewReadme
shell\ViewReadme\command=%WINDIR%\notepad.exe \README.txt
shell\ViewReadme=View Read Me
shell\InstallServer\command=%WINDIR%\System32\msiexec.exe /i MyApp1.msi
%*
shell\InstallServer=Install MyApp1
shell\InstallClient\command=%WINDIR%\System32\msiexec.exe /i MyApp2.msi
%*
shell\InstallClient=Install MyApp2
[DeviceInstall]
The icon is properly associated, and the shell verbs appear on the CD's
context menu properly. However, on insertion and when any of the verbs
are run, Windows gives the error "Device not ready". However, the CD is
fully viewable from Windows Explorer, and the verb's command works from
the Run dialog and from the Command-line (cmd.exe).
After receiving the error initially, I proceeded with the following
changes to try to solve it:
#1 - 'shell=ViewReadme' was located at the end. Moved to start to match
MSDN documentation.
#2 - put label value in quotes
#3 - specified msiexec instead of just the msi file based on the MSI
extension file association in Windows Explorer.
#4 - Added [DeviceInstall] with no sub-entries
#5 - Added the 'action' since [2] said it was required
However, none of them resulted in any change of behaviour. My primary
test machine is a Win2k SP4 system, and other CD's Autorun just fine on
it, but they seem to only use the open and icon functionality.
The following are the MSDN Resources I referenced to create it:
[1]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/autorun/autoplay_works.asp
[2]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/autorun/autoplay_cmds.asp
I have the issue with both Win2k and WinXP, though XP works a little
better in that it renames the CD according to the label specified -
otherwise, identical problem. In both systems, my test user is an
administrator (e.g. belongs to the Administrators group).
What am I doing wrong?
Ben
|