PDA

View Full Version : CD Autoplay - Is it possible to get it to run a program of my choice?


Palindrome
November 4th 08, 01:28 PM
Hi,
As per the subject line - I would like to add my own "autoplay" so that,
whenever a CD is inserted, a program of my choice would run - automatically.

(The program that would run could be a batch file, or a Delphi .exe)

Can that be done and, if so, how?

--
Sue

Daave
November 4th 08, 02:32 PM
Palindrome wrote:
> Hi,
> As per the subject line - I would like to add my own "autoplay" so
> that, whenever a CD is inserted, a program of my choice would run -
> automatically.
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?

Try Tweak UI:

http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

or

http://windowsxp.mvps.org/tweakui.htm

Daave
November 4th 08, 02:32 PM
Palindrome wrote:
> Hi,
> As per the subject line - I would like to add my own "autoplay" so
> that, whenever a CD is inserted, a program of my choice would run -
> automatically.
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?

Try Tweak UI:

http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

or

http://windowsxp.mvps.org/tweakui.htm

Daave
November 4th 08, 02:32 PM
Palindrome wrote:
> Hi,
> As per the subject line - I would like to add my own "autoplay" so
> that, whenever a CD is inserted, a program of my choice would run -
> automatically.
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?

Try Tweak UI:

http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

or

http://windowsxp.mvps.org/tweakui.htm

Daave
November 4th 08, 02:32 PM
Palindrome wrote:
> Hi,
> As per the subject line - I would like to add my own "autoplay" so
> that, whenever a CD is inserted, a program of my choice would run -
> automatically.
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?

Try Tweak UI:

http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

or

http://windowsxp.mvps.org/tweakui.htm

Daave
November 4th 08, 02:32 PM
Palindrome wrote:
> Hi,
> As per the subject line - I would like to add my own "autoplay" so
> that, whenever a CD is inserted, a program of my choice would run -
> automatically.
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?

Try Tweak UI:

http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

or

http://windowsxp.mvps.org/tweakui.htm

Daave
November 4th 08, 02:32 PM
Palindrome wrote:
> Hi,
> As per the subject line - I would like to add my own "autoplay" so
> that, whenever a CD is inserted, a program of my choice would run -
> automatically.
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?

Try Tweak UI:

http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

or

http://windowsxp.mvps.org/tweakui.htm

Daave
November 4th 08, 02:32 PM
Palindrome wrote:
> Hi,
> As per the subject line - I would like to add my own "autoplay" so
> that, whenever a CD is inserted, a program of my choice would run -
> automatically.
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?

Try Tweak UI:

http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

or

http://windowsxp.mvps.org/tweakui.htm

Steve Yandl
November 4th 08, 06:01 PM
Sue,

On the root folder of your CD, you need to place a text file named
Autorun.inf. If you know how to write batch files, I'm going to assume you
know how to create a text file with the extension inf rather than txt.

The first line of autorun.inf should be
[AutoRun]

If you want a special icon to show in Windows Explorer when you insert this
CD, the next line should be:
ICON =
where the full path to the icon file follows the equal sign.

Next, you should have a final line that is
OPEN =
where the path and file name of an executable you want run follows the equal
sign.

There is an important caveat here. The file association information
contained in the registry won't be used when the "OPEN =" line gets read.
This means your exe file would run just fine, but if you want to run the
batch file, you should have the open line point to cmd.exe and then your
batch file listed as an argument to cmd.exe. If the batch file or exe file
you want run is also in the root folder of your CD, you don't need the full
path but you will need full path statements for exe files you reference that
are on your hard drive (this is where it can get even more tricky if you're
distributing the CD to people who might have key files located in atypical
folders on their hard drives).

It isn't a big deal but I prefer that someone getting a CD from me not have
to see the command (console) window flash briefly as cmd.exe is launched.
To avoid that, I prefer to use a vbScript file rather than a batch file. If
a vbScript file is used, you get it run using WScript.exe or CScript.exe
instead of cmd.exe. If you're good with html, you might also opt to create
an HTA file which makes available all sorts of tools to create an interface
for your users.


Steve Yandl



"Palindrome" > wrote in message
. ..
> Hi,
> As per the subject line - I would like to add my own "autoplay" so that,
> whenever a CD is inserted, a program of my choice would run -
> automatically.
>
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?
>
> --
> Sue

Steve Yandl
November 4th 08, 06:01 PM
Sue,

On the root folder of your CD, you need to place a text file named
Autorun.inf. If you know how to write batch files, I'm going to assume you
know how to create a text file with the extension inf rather than txt.

The first line of autorun.inf should be
[AutoRun]

If you want a special icon to show in Windows Explorer when you insert this
CD, the next line should be:
ICON =
where the full path to the icon file follows the equal sign.

Next, you should have a final line that is
OPEN =
where the path and file name of an executable you want run follows the equal
sign.

There is an important caveat here. The file association information
contained in the registry won't be used when the "OPEN =" line gets read.
This means your exe file would run just fine, but if you want to run the
batch file, you should have the open line point to cmd.exe and then your
batch file listed as an argument to cmd.exe. If the batch file or exe file
you want run is also in the root folder of your CD, you don't need the full
path but you will need full path statements for exe files you reference that
are on your hard drive (this is where it can get even more tricky if you're
distributing the CD to people who might have key files located in atypical
folders on their hard drives).

It isn't a big deal but I prefer that someone getting a CD from me not have
to see the command (console) window flash briefly as cmd.exe is launched.
To avoid that, I prefer to use a vbScript file rather than a batch file. If
a vbScript file is used, you get it run using WScript.exe or CScript.exe
instead of cmd.exe. If you're good with html, you might also opt to create
an HTA file which makes available all sorts of tools to create an interface
for your users.


Steve Yandl



"Palindrome" > wrote in message
. ..
> Hi,
> As per the subject line - I would like to add my own "autoplay" so that,
> whenever a CD is inserted, a program of my choice would run -
> automatically.
>
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?
>
> --
> Sue

Steve Yandl
November 4th 08, 06:01 PM
Sue,

On the root folder of your CD, you need to place a text file named
Autorun.inf. If you know how to write batch files, I'm going to assume you
know how to create a text file with the extension inf rather than txt.

The first line of autorun.inf should be
[AutoRun]

If you want a special icon to show in Windows Explorer when you insert this
CD, the next line should be:
ICON =
where the full path to the icon file follows the equal sign.

Next, you should have a final line that is
OPEN =
where the path and file name of an executable you want run follows the equal
sign.

There is an important caveat here. The file association information
contained in the registry won't be used when the "OPEN =" line gets read.
This means your exe file would run just fine, but if you want to run the
batch file, you should have the open line point to cmd.exe and then your
batch file listed as an argument to cmd.exe. If the batch file or exe file
you want run is also in the root folder of your CD, you don't need the full
path but you will need full path statements for exe files you reference that
are on your hard drive (this is where it can get even more tricky if you're
distributing the CD to people who might have key files located in atypical
folders on their hard drives).

It isn't a big deal but I prefer that someone getting a CD from me not have
to see the command (console) window flash briefly as cmd.exe is launched.
To avoid that, I prefer to use a vbScript file rather than a batch file. If
a vbScript file is used, you get it run using WScript.exe or CScript.exe
instead of cmd.exe. If you're good with html, you might also opt to create
an HTA file which makes available all sorts of tools to create an interface
for your users.


Steve Yandl



"Palindrome" > wrote in message
. ..
> Hi,
> As per the subject line - I would like to add my own "autoplay" so that,
> whenever a CD is inserted, a program of my choice would run -
> automatically.
>
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?
>
> --
> Sue

Steve Yandl
November 4th 08, 06:01 PM
Sue,

On the root folder of your CD, you need to place a text file named
Autorun.inf. If you know how to write batch files, I'm going to assume you
know how to create a text file with the extension inf rather than txt.

The first line of autorun.inf should be
[AutoRun]

If you want a special icon to show in Windows Explorer when you insert this
CD, the next line should be:
ICON =
where the full path to the icon file follows the equal sign.

Next, you should have a final line that is
OPEN =
where the path and file name of an executable you want run follows the equal
sign.

There is an important caveat here. The file association information
contained in the registry won't be used when the "OPEN =" line gets read.
This means your exe file would run just fine, but if you want to run the
batch file, you should have the open line point to cmd.exe and then your
batch file listed as an argument to cmd.exe. If the batch file or exe file
you want run is also in the root folder of your CD, you don't need the full
path but you will need full path statements for exe files you reference that
are on your hard drive (this is where it can get even more tricky if you're
distributing the CD to people who might have key files located in atypical
folders on their hard drives).

It isn't a big deal but I prefer that someone getting a CD from me not have
to see the command (console) window flash briefly as cmd.exe is launched.
To avoid that, I prefer to use a vbScript file rather than a batch file. If
a vbScript file is used, you get it run using WScript.exe or CScript.exe
instead of cmd.exe. If you're good with html, you might also opt to create
an HTA file which makes available all sorts of tools to create an interface
for your users.


Steve Yandl



"Palindrome" > wrote in message
. ..
> Hi,
> As per the subject line - I would like to add my own "autoplay" so that,
> whenever a CD is inserted, a program of my choice would run -
> automatically.
>
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?
>
> --
> Sue

Steve Yandl
November 4th 08, 06:01 PM
Sue,

On the root folder of your CD, you need to place a text file named
Autorun.inf. If you know how to write batch files, I'm going to assume you
know how to create a text file with the extension inf rather than txt.

The first line of autorun.inf should be
[AutoRun]

If you want a special icon to show in Windows Explorer when you insert this
CD, the next line should be:
ICON =
where the full path to the icon file follows the equal sign.

Next, you should have a final line that is
OPEN =
where the path and file name of an executable you want run follows the equal
sign.

There is an important caveat here. The file association information
contained in the registry won't be used when the "OPEN =" line gets read.
This means your exe file would run just fine, but if you want to run the
batch file, you should have the open line point to cmd.exe and then your
batch file listed as an argument to cmd.exe. If the batch file or exe file
you want run is also in the root folder of your CD, you don't need the full
path but you will need full path statements for exe files you reference that
are on your hard drive (this is where it can get even more tricky if you're
distributing the CD to people who might have key files located in atypical
folders on their hard drives).

It isn't a big deal but I prefer that someone getting a CD from me not have
to see the command (console) window flash briefly as cmd.exe is launched.
To avoid that, I prefer to use a vbScript file rather than a batch file. If
a vbScript file is used, you get it run using WScript.exe or CScript.exe
instead of cmd.exe. If you're good with html, you might also opt to create
an HTA file which makes available all sorts of tools to create an interface
for your users.


Steve Yandl



"Palindrome" > wrote in message
. ..
> Hi,
> As per the subject line - I would like to add my own "autoplay" so that,
> whenever a CD is inserted, a program of my choice would run -
> automatically.
>
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?
>
> --
> Sue

Steve Yandl
November 4th 08, 06:01 PM
Sue,

On the root folder of your CD, you need to place a text file named
Autorun.inf. If you know how to write batch files, I'm going to assume you
know how to create a text file with the extension inf rather than txt.

The first line of autorun.inf should be
[AutoRun]

If you want a special icon to show in Windows Explorer when you insert this
CD, the next line should be:
ICON =
where the full path to the icon file follows the equal sign.

Next, you should have a final line that is
OPEN =
where the path and file name of an executable you want run follows the equal
sign.

There is an important caveat here. The file association information
contained in the registry won't be used when the "OPEN =" line gets read.
This means your exe file would run just fine, but if you want to run the
batch file, you should have the open line point to cmd.exe and then your
batch file listed as an argument to cmd.exe. If the batch file or exe file
you want run is also in the root folder of your CD, you don't need the full
path but you will need full path statements for exe files you reference that
are on your hard drive (this is where it can get even more tricky if you're
distributing the CD to people who might have key files located in atypical
folders on their hard drives).

It isn't a big deal but I prefer that someone getting a CD from me not have
to see the command (console) window flash briefly as cmd.exe is launched.
To avoid that, I prefer to use a vbScript file rather than a batch file. If
a vbScript file is used, you get it run using WScript.exe or CScript.exe
instead of cmd.exe. If you're good with html, you might also opt to create
an HTA file which makes available all sorts of tools to create an interface
for your users.


Steve Yandl



"Palindrome" > wrote in message
. ..
> Hi,
> As per the subject line - I would like to add my own "autoplay" so that,
> whenever a CD is inserted, a program of my choice would run -
> automatically.
>
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?
>
> --
> Sue

Steve Yandl
November 4th 08, 06:01 PM
Sue,

On the root folder of your CD, you need to place a text file named
Autorun.inf. If you know how to write batch files, I'm going to assume you
know how to create a text file with the extension inf rather than txt.

The first line of autorun.inf should be
[AutoRun]

If you want a special icon to show in Windows Explorer when you insert this
CD, the next line should be:
ICON =
where the full path to the icon file follows the equal sign.

Next, you should have a final line that is
OPEN =
where the path and file name of an executable you want run follows the equal
sign.

There is an important caveat here. The file association information
contained in the registry won't be used when the "OPEN =" line gets read.
This means your exe file would run just fine, but if you want to run the
batch file, you should have the open line point to cmd.exe and then your
batch file listed as an argument to cmd.exe. If the batch file or exe file
you want run is also in the root folder of your CD, you don't need the full
path but you will need full path statements for exe files you reference that
are on your hard drive (this is where it can get even more tricky if you're
distributing the CD to people who might have key files located in atypical
folders on their hard drives).

It isn't a big deal but I prefer that someone getting a CD from me not have
to see the command (console) window flash briefly as cmd.exe is launched.
To avoid that, I prefer to use a vbScript file rather than a batch file. If
a vbScript file is used, you get it run using WScript.exe or CScript.exe
instead of cmd.exe. If you're good with html, you might also opt to create
an HTA file which makes available all sorts of tools to create an interface
for your users.


Steve Yandl



"Palindrome" > wrote in message
. ..
> Hi,
> As per the subject line - I would like to add my own "autoplay" so that,
> whenever a CD is inserted, a program of my choice would run -
> automatically.
>
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?
>
> --
> Sue

Palindrome
November 5th 08, 12:31 AM
Steve Yandl wrote:
> Sue,
>
> On the root folder of your CD, you need to place a text file named
> Autorun.inf. If you know how to write batch files, I'm going to assume you
> know how to create a text file with the extension inf rather than txt.

I can stop you there - they aren't my CDs. I just need to run my own
program whenever a CD is inserted. Any CD.

However, I've left your explanation below, as I am sure that it will be
of use to someone else - not to mention myself, should I need to produce
my own CDs.

>
> The first line of autorun.inf should be
> [AutoRun]
>
> If you want a special icon to show in Windows Explorer when you insert this
> CD, the next line should be:
> ICON =
> where the full path to the icon file follows the equal sign.
>
> Next, you should have a final line that is
> OPEN =
> where the path and file name of an executable you want run follows the equal
> sign.
>
> There is an important caveat here. The file association information
> contained in the registry won't be used when the "OPEN =" line gets read.
> This means your exe file would run just fine, but if you want to run the
> batch file, you should have the open line point to cmd.exe and then your
> batch file listed as an argument to cmd.exe. If the batch file or exe file
> you want run is also in the root folder of your CD, you don't need the full
> path but you will need full path statements for exe files you reference that
> are on your hard drive (this is where it can get even more tricky if you're
> distributing the CD to people who might have key files located in atypical
> folders on their hard drives).
>
> It isn't a big deal but I prefer that someone getting a CD from me not have
> to see the command (console) window flash briefly as cmd.exe is launched.
> To avoid that, I prefer to use a vbScript file rather than a batch file. If
> a vbScript file is used, you get it run using WScript.exe or CScript.exe
> instead of cmd.exe. If you're good with html, you might also opt to create
> an HTA file which makes available all sorts of tools to create an interface
> for your users.
>
Thank you for the time that you have spent on the above, it was very
kind and much appreciated.

--
Sue

ju.c[_2_]
November 5th 08, 05:58 AM
This is the best program for creating custom Autoplay Handlers:

Autoplay Repair 2.2.2 225 KB (Freeware)
http://www-stud.uni-essen.de/~sddabacz/show_news.php?id=24


ju.c


"Palindrome" > wrote in message . ..
> Hi,
> As per the subject line - I would like to add my own "autoplay" so that,
> whenever a CD is inserted, a program of my choice would run - automatically.
>
> (The program that would run could be a batch file, or a Delphi .exe)
>
> Can that be done and, if so, how?
>
> --
> Sue

Google