/* === find_cd.c === 2009 Jan 01 * * (C) Copyright Prem Sobel, 2002-2009. All Rights Reserved. * * Rename executable to: "start.exe" for autostart. * * This program finds CD drive and invoked IE to open file * "index.html" on that drive. */ #include #include #include char drive[]="_:\\"; char ie[] = "C:\\Program Files\\Internet Explorer\\iexplore.exe"; char call[300]; int main() { char dr; for(dr='A'; dr<='Z'; dr++) { drive[0] = dr; if(DRIVE_CDROM==GetDriveType(drive)) { sprintf(call,"\"%s\" %sindex.html", ie, drive); system(call); return 0; } } return 0; } // main