Thread: autorun.inf files

  1. #1
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429

    autorun.inf files

    Help... I'm trying to create an install disk and I'm using an html file as a front since there are several installation disks... but I'm having problems with the autorun file.

    Here's what I have:

    [autorun]
    OPEN=install_AI.htm
    ICON=resources\MISCO2.ico

    where install_AI.htm is in the root of the cd, and resources is a folder on the cd.

    It won't open the html file. Anyone know how these things are supposed to be setup? I copied that from another disk. I'm not even really sure what the ICON is supposed to be for... I thought maybe that was the icon that showed in the drive listings!?

  2. #2
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Yea icon is the pic for the file, good guess hehe.

    try dis

    http://search.yahoo.com/bin/search?p...orun+inf+files

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    The OPEN field must be executable, it doesn't do a "find the program to launch this type of file with" search.

    You can get programs (or make one yourself) to call ShellExecute

    [edit]
    In fact, here's some source that might do for you.
    Code:
    #define STRICT
    #include <Windows.h>
    /* */
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pCmdLine, int nCmdShow)
    {
    	int i;
    	for (i = 1; i < __argc; i ++)
    	{
    		if ((int) ShellExecute(NULL, NULL, __argv[i], NULL, NULL, SW_SHOWNORMAL) <= 32)
    		{	// Error trying to run default browser, tell user
    			TCHAR	sz[1024];
    			wsprintf(sz, TEXT("Error openning %s on CD-ROM disc."), __argv[i]);
    			MessageBox(NULL, sz, TEXT("ShellExecute"), MB_OK | MB_ICONWARNING);
    		}
    	}
    	return(0);
    }
    [another edit]
    Obviously thats Window code, so not very portable if you want the CD viewed on other OS's.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    help... please see the c++ board...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 03:28 AM
  2. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04:45 AM
  3. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  4. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM
  5. header and source files
    By gtriarhos in forum C Programming
    Replies: 3
    Last Post: 10-02-2005, 03:16 AM