Handling CD Autorun?

  • Thread starter Thread starter Carl Fenley
  • Start date Start date
C

Carl Fenley

I am writing a new version of a legacy application. The legacy application
comes packaged with end-user data on a CD or DVD.

When the end-user inserts the CD, the application is either installed or
launches if it is already installed. If the end-user has the application
open and inserts a new CD (containing the legacy app), a new instance of the
application is launched. That's fine for the legacy application.

The new application is a single-instance app, so that prevents a new
instance of the application from being launched. However, I still want to
load the data the end-user intended to load by inserting the CD, but in the
existing instance.

I hope this makes sense. Any help, suggestions, or information would be
greatly appreciated.

carl
 
Hi carl,

I have released many CD's that autorun. This is what I do:

Write a C program that uses ShellExecute & that passes a string as an
argument

Then create an autorun inf file like this:

[AUTORUN]
open=shellx index.htm
icon=bla bla bla

(shellx = my C shell execute program)
(index.htm = what I always open), but you can call the Windows installer of
course

In fact, if you use Windows installer, just create the inf file to point to
the Windows installer

One thing you have to think about is if the end user has a CD/DVD Writer
with for example Nero Burning ROM then autorun will be disabled, so, then
your autorun will fail.

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE
 
Crouchie1998 said:
Hi carl,

I have released many CD's that autorun. This is what I do:

Write a C program that uses ShellExecute & that passes a string as an
argument

Then create an autorun inf file like this:

<snipped>

That's all good advice, but I need to know a legacy CD is inserted. Say the
end-user is browsing a new content CD with the new application, but wants to
review legacy content for a comparison. So, the end-user inserts an old CD
and it immediately installs the old application on the computer (unless
canceled). That's the behavior I'm trying to avoid.

Is there a way to detect a CD media insert and at least read the name of the
CD? Any more help is very much appreciated.

carl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top