View Full Version : MSDE and MAINTENANCE

07-28-2002, 02:37 AM

In my project I need to install MSDE. I can do it two ways currently, either through the Merge Modules of through my InstallScript. The problem is as follows...

- I can make the Merge Module install to the user-defined directory, but I can't stop the MergeModule from always installing. I noticed that Robert Dickau said you can edit the MergeModule and change the condition from "Not Installed", but what do I change it to so that the MergeModule will not install If I already have MSDE or MSSQL on the target machine??? I know how to do this in my project, but not in the MergeModule because the MergeModule does not have reglocator or appsearch etc...

- To get around the MM always installing, I created an Installscript which works fine, but the only problem is that it will not install to a user-defined directory. Currently I am using -

svTemp1 = SRCDIR ^ "MSDEx86.exe";
svTemp2 = "\""+SRCDIR ^ "unattend.iss\"";
nResult = LaunchAppAndWait ( svTemp1," -s -a -f1 " + svTemp2 + " -TARGETDIR="+"\""+svDataDir +"\\\"", WAIT );

(where svDataDir is my user defined Database Install Directory defined at run time)

does anyone know what I should change this to, to make it install to svDataDir instead of C:\MSSQL7????

And finally...

- For some reason, the code inside this if statement always gets executed...

if (!MAINTENANCE) then
//do stuff

I checked the value of MAINTENANCE, and for some reason it is ALWAYS set to false. Is there some property that I have to set to make it change depending on the Installation type??? I am using an MSI project.

Any help is appreciated!



07-28-2002, 10:23 PM
To make MSDE install to a different directory, create your own "ISS" file at runtime and change the two following lines:


When you launch MSDEx86.EXE use your custom "ISS" file instead of the default one provided by Microsoft.

07-28-2002, 11:14 PM
Thanks for the reply tjones.

I thought about doing this, but I wasn't sure how to go about it since the .iss file will be on a cd (ie can't write to it).

So I'm guessing that i will have to copy the .iss file to the target computer first, then edit it, then install using this file. This does seem a bit excessive, so I'm wondering how does the MSDE merge module do it? I know that you can specify a path that can be set at run time and the Merge Module will install to this location, so I'm assuming that there must be a command line (or something to that effect) which you can set to get MSDE to install to.

Any ideas?

07-29-2002, 03:34 AM
I figured it out.

I actually edited the MSDE merge module directly, and changed it's install condition to my install condition that I created in my project (eg. Not MSDECHECK and Not Installed etc..) and the Merge Module now installs conditionally to the correct directory. Also, MSDE doesnt say it's actually installing when it really isn't.

It's pretty sweet.

Hope this helps some other people out if they really need it!

I'm still having the !MAINTENANCE problem though :(