PDA

View Full Version : OnNextDisk no longer supported?



Zangow
03-10-2006, 11:38 AM
So, it appears that OnNextDisk can no longer be overridden. What's an alternative to changing the enterdisk message when prompting for another disk? Thanks

RobertDickau
03-10-2006, 01:45 PM
For an MSI project, please see the Windows Installer Help Library topic "Authoring Disk Prompt Messages".

Zangow
03-13-2006, 01:18 PM
It appears my project is a typical Installscript project - not MSI. Is OnNextDisk still usable in this version? If so, it appears to work at first and then later in the installation, it asks for disk 2 and then immediately says the data3.cab file can't be found and the installation aborts. Here's my implementation of OnNextDisk:

function OnNextDisk(File, Disk, Path)
// variable declarations
begin
NumToStr(svDisk, Disk);
if(!Is(FILE_EXISTS, Path ^ File)) then
VarSave(SRCTARGETDIR);
SRCDIR = Path;
StrSub(svDrive, SRCDISK, 0, 1);
svMessage = "Please insert disk " + svDisk + " into drive " + svDrive + ".";
nResult = EnterDisk(svMessage, File);
VarRestore(SRCTARGETDIR);
else
nResult = OK;
endif;

return nResult;
end;

Thanks :-)

Zangow
03-14-2006, 10:42 AM
Finally figured out this problem, which would've been a no-brainer to mention somewhere in a document about OnNextDisk. But it appears OnNextDisk has to be implemented at the end of Setup.rul. I tried doing it in my sfile.rul file where all the file transaction stuff is and it would call the function each time, but then fail miserably near the end of the installation. So that's it... The code I wrote in the last post does work, just needs to be in the right spot :D