>>I have an app that queries data log files, using parameterized views. The source file for the view can be a file on the network server, or an archive file on a CD.
>>Based on the events date, the app looks at the files available on the network or prompts the user for inserting the required CD. All works well except that the CD drive is set to take some action when loading a CD - usually, it opens a folder.
>>In this app case I want to set the drive to take no action when loading a CD, and then, of course I'd like to restore the original setting.
>>From what I've read, it seems there is a bit in a registry key that controls this... Does anybody have code to do what I described safely?
>
>I'd guess you've already seen:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/autorun/autoplay_reg.asp>
>Do your users really *need* Autorun? Do you _have_ to restore the original setting? :-)
>
>My guess would be that the "unreliable" part of using the Registry method in the above link refers to restoring Autorun to "Yes" - this may not be reliable while the machine is running. However, I would think on a fresh boot it would be turned back on successfully, presuming it depends (solely) on that registry setting.
In my view, nobody, never needs no stinking autorun! ;)
Or, at least, make the default setting for CD "take no action".
I browsed that MS article... It talks about the autorun, but I am not even sure that autorun is my problem - don't you need autorun.inf on the CD in order for it to click? All that is on the CD is DBFs, no autorun.inf, and the action that I see is "open a folder"...
Our net admin offered to set "take no action" through a group policy, I guess, I'll go with that.
Doru