![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2006
Posts: 1
Rep Power: 0
![]() |
auto run
does anyone know how to make a program run automatically(which is stored on a removable device) , when that device is pluged into the computer. im pretty new to c programming but have a background in other languages. i was just wondering this for a project i was thikning about,, thanks for any feedback
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
What kind of storage device? On Windows a lot of people have their CD auto play, but one can turn that off. If they have it on, then there is an ini file which you can use, it's called autorun.inf, which tells the computer which program to run.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#3 |
|
Expert Programmer
|
Yeah a good way for Windows is what nnxion said.
If the programs executable is on a CD or other storage device, create a file named autorun.inf in its top level directory. The autorun.inf should contain this text: [autorun] open=YourProgram.exe icon=YourIcon.ico That is only a basic file, and it can be changed a lot. Check out a tutorial (use google to find one) for more advanced stuff ![]() ~Cold
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|