View Full Version : New to MSI Installer - Multiple CD Install dialog box
sablewing
05-19-2008, 11:00 PM
I am new to MSI Installer and I am trying to setup an install that will span 2 CD's. I have gotten the project setup to with 2 Media Items that save Raw files, associated the files with one or the other media items, and modified the build settings to use a standard bootstrapper with the bootstrapper looking for the MSI file in an external location. The project builds successfully and generates the two directories correctly. And if I copy the contents of both directories at the top level with my setup.exe and setup.msi the installer works correctly. I had tried other settings but couldn't get them to work so I ended up with the items described.
Where I am having a problem is when I am going through the install and waiting for a prompt to insert the Next CD. I get an error dialog that reports it can't find the file and I would like to modify the action to go to another dialog that asks the user to insert the next CD. I have found the default Error dialog in the Dialog->Advanced Settings but the buttons do not match, ie the default error shows one button of Yes while the error dialog I am seeing shows 3 buttons, Cancel, Retry, Ignore.
Do I need to add a dialog? And if I do, which dialog should I hook it into so that when the error of can't find file pops up I can have it check to see if the item is on a different media type and the user should insert the next CD? And if there is an easier way to setup a multiple CD install I would be very happy to hear about it. :D And is there an easy way to see what files are associated with a Media Item and how much space they take up? I'm currently using the by guess method of associating files with one media type or another
Thanks in advance for any help you can provide on this. Meanwhile, I'll keep digging on my own to see what I can figure out.
Lorne
05-20-2008, 12:31 PM
Where I am having a problem is when I am going through the install and waiting for a prompt to insert the Next CD. I get an error dialog that reports it can't find the file and I would like to modify the action to go to another dialog that asks the user to insert the next CD. I have found the default Error dialog in the Dialog->Advanced Settings but the buttons do not match, ie the default error shows one button of Yes while the error dialog I am seeing shows 3 buttons, Cancel, Retry, Ignore.That generic error dialog is a bit weird, it actually has several buttons -- they're just lined up on top of each other by default. I think Windows Installer moves the buttons around automatically to fashion different kinds of dialogs.
Do I need to add a dialog? And if I do, which dialog should I hook it into so that when the error of can't find file pops up I can have it check to see if the item is on a different media type and the user should insert the next CD?That's a good question. I wish I could help you with this one, but I have no idea how to make MSI use new support dialogs. You might find something on google, or you could try asking in the WiX mailing list perhaps.
And if there is an easier way to setup a multiple CD install I would be very happy to hear about it. :D And is there an easy way to see what files are associated with a Media Item and how much space they take up? I'm currently using the by guess method of associating files with one media type or anotherI thought you could add the Media Source as a column to the file list, but I just checked and I didn't see it there. I've logged media organization to be looked into for a future release. (REF: 17421, 17422)
Thanks in advance for any help you can provide on this. Meanwhile, I'll keep digging on my own to see what I can figure out.If you know of any .msi installers that already behave the way you want, you might be able to reverse-engineer them a bit using dark, which is a tool that can generate WiX XML from an existing .msi file. (You could also examing the .msi file itself using Orca.)
sablewing
05-20-2008, 11:34 PM
Thanks for more information and I now noticed the various buttons that are sitting in the Error Dialog, so that explains what I was seeing.
After some more digging, I think my problems lies with how I am defining the Media Items. I found this article, http://blogs.technet.com/alexshev/default.aspx, which talks about defining an installer that goes across more than one disk. I am starting to play with those settings to see what I can come up with that will work. After logging the error messages, what is happening is that an error 1309, file not found, is coming up when I need it to generate an error 1302, Insert next disk, which will fire off the Insert next disk message in the Error Dialog.
At least I'm learning a lot more about the underlying install technology which is a nice side benefit. :)
sablewing
05-23-2008, 10:06 PM
I have now gotten a multiple CD install to work. Here are the items I have set. And in order to test the installer it has to be written to the media and the media needs to be used for the install. Trying to test the installer on the disk drive does not produce the correct error message for the Insert Disk
1. Insert DISKPROMPT Property in Project->Settings Properties Tab. Set the value to the message you want displayed when the user is prompted for the next disk, such as "Productname - Please Insert Disk [1]". The [1] is the area where the media name will be inserted
2. Create multiple Media Items by Selecting Project->Media. Edit the default item created and set Volume Label to the name you will use for your media. The name in the Disk Name: text box is the text placed in the Dialog box when the user is prompted to enter the next disk.
Select type of Cabinet File and I used the default of MSI compressed files. I set the Cabinet Filename to something like "CAB001.cab". You may be able to use other file names but I haven't tested that out yet. Uncheck the box for Embed Cabinet File in MSI Database.
3. After adding in the Media items, assign the files to the different media types. I didn't find a good way to check the size of the files being included in the media type so I just took a guess. Select the files you want included in a media type. Select File->File Properties. In the General tab, select the Media Source, the default is 1. After clicking Ok, select another set of files, select File-File Properties, then select another media source, in my case it was 2. Repeat until you have assigned the files to the various media sources.
4. For my setup I wanted to use an external Bootstrapper file called setup.exe, so I don't know if this step is necessary. Select Build->Settings. In the Setup tab in the Bootstrapper section select Standard Bootstrapper the select the Edit button next to the option. In the Settings Tab select External to ("beside") bootstrap executable, then select Ok. In the Summary: section verify that there are two file names in the Output filename, in my case I used setup.msi and setup.exe
5. Build the project. Once the files are built, burn the files setup.exe, setup.msi and the first cabinet file, in my case CAB001.CAB to the first CD. Other files such as readme and autorun.inf are also added at this time. Name the volume the same name defined in the Media item Volume Name field. Burn the remaining cab files to other media. For me this was one additional CD with the file CAB002.CAB on a CD name CD2.
Once I burned the files to CD the correct prompt message showed up when the installer couldn't find the next file. There is now browse option in the dialog box so it is important to name the cd with the volume name defined in the Media item properties.
I realize that with DVD's now this probably isn't a common problem but hopefully someone else will find this information useful.
Lorne
05-26-2008, 10:21 AM
Thanks Sablewing! :) Those are very good instructions.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.