Help with cd autorun program

A

AOECheatmaster

I am trying to write a C++ autorun launcher, but i have a problem, i
cannot figure out how to set the buttons to launch the apps to use
whatever drive number the CDROM is located at, all i can think of is to
have it default to D:\, but then it won't work on most computers!!!
Please help!!!
 
R

red floyd

I am trying to write a C++ autorun launcher, but i have a problem, i
cannot figure out how to set the buttons to launch the apps to use
whatever drive number the CDROM is located at, all i can think of is to
have it default to D:\, but then it won't work on most computers!!!
Please help!!!

And your C++ question is? The C++ language does not discuss "autorun",
"launcher", "CDROM", or "buttons".

Try a Microsoft specific newsgroup.
 
A

AOECheatmaster

red said:
And your C++ question is? The C++ language does not discuss "autorun",
"launcher", "CDROM", or "buttons".

Try a Microsoft specific newsgroup.

OK, let me clarify, what i am trying to do is find out if i can have
the program, on initialization, grab the location of the cdrom drive
from the system, and set it to a static variable for the session. I was
wondering if it is possible to have this occur every time i run the
program
I hope this clears up the confusion.
 
M

mlimber

OK, let me clarify, what i am trying to do is find out if i can have
the program, on initialization, grab the location of the cdrom drive
from the system, and set it to a static variable for the session. I was
wondering if it is possible to have this occur every time i run the
program

Yes:

#include <string>

// Prototype
std::string GetCDROMLocation();

// static to represent file-scope has been deprecated;
// use anonymous namespaces instead
namespace
{
const std::string cdromLocation = GetCDROMLocation();
}

int main()
{
// ... use cdromLocation here ...
}

The details of what GetCDROMLocation() does, however, should be sought
from a group dealing with your platform.

Cheers! --M
 
R

ralph

OK, let me clarify, what i am trying to do is find out if i can have
the program, on initialization, grab the location of the cdrom drive
from the system, and set it to a static variable for the session. I was
wondering if it is possible to have this occur every time i run the
program
I hope this clears up the confusion.

This group is about standard C++. You still didn't post a C++ question.
Please take AOECheatmaster's advice and try a Microsoft specific group.
 
R

ralph

ralph said:
This group is about standard C++. You still didn't post a C++ question.
Please take AOECheatmaster's advice and try a Microsoft specific group.

Oops. Of course red floyd gave you the advice to try another group...
sorry!
 
A

AOECheatmaster

ralph said:
Oops. Of course red floyd gave you the advice to try another group...
sorry!

Thanks guys, but i believe that i can use dotNet like the previous
person posted, so that may work. I appreciate the help, because if a i
cannot do it in standard C++ then i must need to use dotNet.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top