Teen Programmers Unite  
 

 

Return to forum top

autorun

Posted by whizkide [send private reply] at February 09, 2002, 03:31:00 PM

how do i write a self executable program

Posted by CodeRed [send private reply] at February 09, 2002, 05:20:15 PM

You don't. There is no such thing. Any programs that start up automatically with windows are either defined in the registry, in windows startup folder, or started using autoexec.bat

Posted by buzgub [send private reply] at February 09, 2002, 09:28:39 PM

If what you're really asking is how to get a program to run automatically when you put a CD into your drive, you need a file called autorun.inf in the root directory of the CD. I'm not sure of the exact syntax, but it's a plain text file. You can read the file used by any other disc (most games should have a file you can examine). Bear in mind that this is all windows-specific, so it'll be useless under other operating systems.

Posted by RedX [send private reply] at February 10, 2002, 01:35:16 PM

An autorun-file:
-----------------
[autorun]
OPEN=AUTORUN.EXE
ICON=OPFOR.ICO

Change "autorun.exe" to the name of you executable and
"opfor.ico" to the icon-file to use. name the file autorun.inf and place it in the root-dir of the CD.
That should do the trick.

RedX

Posted by sphinX [send private reply] at February 11, 2002, 11:56:00 PM

and make sure the exe name is all one word, windows won't run anything else even if it's enclosed in quotation marks. (at least not in my experience)

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.