BOOT.INI Information Utility

Sample Output

Brief Information about the November 98 CSIG Meeting

BOOT.INI Information Utility

Windows NT uses a special configuration file to tell it how to boot. This is the "BOOT.INI" file. It is a simple text file with about a half a dozen lines. The syntax of the lines follows the "Advanced RISC Computing" (ARC) naming conventions. On Pentium computers the ARC names describe the location of the boot partition for each instance of Windows NT. It is possible to have several versions of Windows NT and/or other operating systems configured by this BOOT.INI file.

The program for this month started out as a simple text based utility for helping to understand the syntax of the ARC convention. This text based program is called the ARC.CPP and is written in Microsoft Visual C++ version 5. However since it is generic "C" code it should run with any compiler.

I have also created a version of this program called ARCW.CPP. This second program is a very simple Windows type program which runs from the command line but all the screen activity is shown in a real window. The concept is very simple. The program is compiled as a Windows program and therefore contains a procedure called "winmain()". The input to the program is given on the command line and from an input file. The output of the program, particularly any error messages, is handled with "message box" functions. The major output of the program, the analysis of the BOOT.INI file, is presented in a text data file which is then displayed using NOTEPAD.

Using this technique it is very easy to convert a non-Windows program into a Windows program.

"Random Access" questions start at 7:30 Tuesday night. See you there.

You can get the source code and the executable programs from links on C User Group: The source code and executables will be available directly from the ACGNJ ftp server:

See SOURCE CODE links below.

Sample Code:

FILE *fsout;

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR args, int show)
    int argc;  char *argv[20];
    char *p, outputname[_MAX_PATH], buff[_MAX_PATH];
    char full[_MAX_PATH];
    p = GetCommandLine();		    // check command line information
    parse(p, &argc, argv);
    if (argc==1)
	::MessageBox(NULL, VERSION, "ArcW.exe", MB_OK); return 0;

    p = getenv("TEMP");			    // Open a temporary destination file
    sprintf(outputname,"%s%s", p, "\\~ArcW.txt");
    fsout = fopen(outputname,"w");
    if (NULL == fsout)
	::MessageBox(NULL, _sys_errlist[errno], outputname, MB_OK); exit(1);

    _fullpath( full, argv[1], _MAX_PATH );  // get the absolute path of the input file
    fprintf(fsout,"****** Input file ---> %s ******\n",full);

    process (argv[1]);			    // process the input file

    sprintf(buff,"NOTEPAD.EXE %s",outputname);	// show results in NOTEPAD
    WinExec(LPCTSTR(buff), SW_SHOWNORMAL);
    return 0;

"Random Access" questions start at 7:30 Tuesday night.


Source Code Files

For help, email me at b a r n o l d @ b l a s t . n e t
Back to C++ Main Page