PDA

View Full Version : How to run an .exe program from a CD and lose the loader



tpeck
Mar 31st, 2007, 07:55 AM
How to run an .exe program from a CD without an .html page loading it?

or if you have to have an .html page loader, how do you get rid of it after the .exe program is loaded and run?

I am using an .html page loader and I have practically achieved the desired result except for nuking the page.

More detail (if required...)

I want to be able to run a program from a CD after the CD is inserted, which checks if a particular file (a flag file) is on the hard disk (it doesn't matter the drive letter).

If the file exists, an .exe program is loaded and runs, installs whatever is necessary - including the flag file - and ends with a message telling the user to reinsert the CD.

Upon reinsertion, the CD will once again check for the flag file's existence, and since it will exist this time, will get on with loading the CD.

I CAN DO ALL OF THE ABOVE EXCEPT that I can't make the .html page which loads the .exe file disappear:



...
...
...
else if (menuletter==false){
alert("Please RUN the file \"file.exe\" and then RE-INSERT THE CD IN YOUR DRIVE.");
location.href='file:///'+driveletter+':/file.exe'; return true;
something('something.html', 'something);


Above is the last part of a lot of code which discovers the "driveletter" of the CD, and since the "menuletter" is false, knows that the flag file is missing. Thus it attempts to load the program "file.exe". Great! And it works!

BUT... That last line in blue nukes the .html page, which otherwise hangs around like dirty washing. And that page nuking works too, but only if the file.exe is not being loaded.

(I have deliberately not announced to the world how to nuke an .html page in case an idiot gets loose with it.)

I can't get that last line in blue to do it's thing sequentially.

So my question is "how can I load the file AND then terminate the .html page?"

I realise some people will object that nuking an .html page is an affront to programming - and they are probably right. But this will all happen practically covertly and the .html page is hardly doing anything other than loading the file.exe so why should anyone care? I'm not trying to get any of this happening in FF or NS by the way. They are not browsers I need to care about for this operation (lovely though they might be elsewhere).

If all this is too horrible (nuking an .html page loading an .exe file), then how to run a program from a CD without an .html loader page?

Thanks.