Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C (http://www.programmingforums.org/forum60.html)
-   -   auto run (http://www.programmingforums.org/showthread.php?t=8946)

master1223 Mar 19th, 2006 7:51 PM

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

nnxion Mar 20th, 2006 5:42 AM

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.

coldDeath Mar 20th, 2006 11:19 AM

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 :D

~Cold


All times are GMT -5. The time now is 5:12 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC