I have written the following script as an autorun feature for a reference CD that I've made. The script finds out where IE4 is installed, then launches my index.htm. It runs perfectly when copied to the harddrive, but gets the wrong path when running from CD:
------------------------------------
SETCONSOLE("MINIMIZE")$welcome = MESSAGEBOX("Welcome to the Ultimate Reference Guide." + chr(13) + chr(13) + "This Reference CD contains some unlicensed information and hence breaches copyright laws." + chr(13) + chr(13) + "Use at your own discretion." + chr(13) + chr(13) + "Press OK to continue, Cancel to abort.", "The Ultimate Reference Guide!", 65)
If $welcome = 2
BEEP
BEEP
EXIT
EndIf
$InstallPath=READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\IE4\SETUP", "Path")
If @ERROR = 0
? "IE4 Install Path: $InstallPath"
Endif
If @ERROR <> 0
MESSAGEBOX("Unable to locate Internet Explorer 4. Please launch index.htm manually.", "The Ultimate Reference Guide!", 48)
BEEP
EXIT
Endif
RUN $InstallPath + "\iexplore.exe " + @CURDIR + "\index.htm"
If @ERROR = 0
? "IE4 launched successfully."
Endif
If @ERROR <> 0
MESSAGEBOX("Unable launch Internet Explorer 4. Please launch index.htm manually.", "The Ultimate Reference Guide!", 48)
BEEP
EXIT
Endif
---------------------------------
When running from CD, Internet Explorer says "Cannot find file 'file:///D://index.htm'". What KiXtart seems to do it to add an extra forward slash.
Any ideas? I've spent ages compiling this CD and would love to see the autorun feature working (I execute this script via a batch file that is referenced in the autorun.inf file on the CD).
Thanks for your help in advance.
please respond to p.j.duncan@altavista.net
Paul Duncan