![]() |
![]() |
|
November 24, 2005Any MSDE Gurus Out There?Its almost 2 in the morning, and I am at my witts end. I have been trying to find the answer to this and its driving me batty. You see, I have a 4 MB installer that does a marvelous job of getting an application I wrote onto a host machine. With that said, its kind of a useless installer, because it uses MSDE and requires a specialized named instance to work. I have a prereq that requires MSDE to be installed, which isn't a problem since on most machines, its SBS with it already there. On XP machines, they can easily download and install it. Back to my problem though. To add a named instance to MSDE, the documentation state you must recall the MSDE setup and pass it a few parameters. Here lies the first problem. My installer has NO IDEA where the setup executable for MSDE is, if its even on the system anymore. And chances are, neither will the user. So the solution is to distribute it so we can take care of it for the user. I found out you can actually strip the 66 MB MSDE installer down to a 1.8 MB MSI and a 25 MB cab file (SqlRun01.msi and SqlRun.cab). Even with compression though, its adding about 24 MB to my installer. What happened to my nice small app that's easy to download, and takes little bandwidth resources *sigh* Now that I am distributing the files, my cmd line looks something like this: SqlRun01.msi INSTANCENAME=MyInstanceName SAPWD="SomePass" REBOOT=ReallySuppress DISABLENETWORKPROTOCOLS=1 DISABLEAGENTSTARTUP=1 DISABLETHROTTLE=1 And it works. But I HATE IT. I have to now distribute a huge file to support this. There has to be another way to create a named instance in MSDE. Does anyone know of a way to do this programatically without having to ship the CAB file??? If you do, please email me or leave me a comment. I think its rather unacceptable to have to ship a setup installer of someone elses product that is already installed just to configure it. I must be missing something simple here. Guru knowledge very much welcomed. Posted by SilverStr at November 24, 2005 01:53 AM | TrackBackComments
Sorry to say, but I think you're screwed. The install experience for MSDE is very bad (even if you use the merge modules and hack them to work, which means you have to release patches from then on to fix MS security holes) and it's even worse for SQL Express. The only thing you might be able to do is tell your installer that MSDE is on the CD that the installer is installing from and that it's a relative path from there. Although it sounds like your target it to make this a download. You might use Wise, in which case it can selectively download what's necessary.... Or choose not to use a named instance if there is already an SQL Server available and just install your database to that SQL Server and set application security.... (which is what we do) Posted by: James Hancock at November 24, 2005 06:33 AMIf you're requiring a named instance, then you don't have much room to work with. "I think its rather unacceptable to have to ship a setup installer of someone elses product that is already installed just to configure it." Since you're requiring a specifically named instance, you aren't just 'configuring' MSDE - you're installing MSDE again in order to get the named instance. Each MSDE/SQL instance is a separate installation. Posted by: Chad at November 24, 2005 11:52 PMThanks for the info guys. As an update, I found a way around my problem. I wrote a small console application that recursively looks for all setup.exe on the system. When it finds one, it interogates the FileVersionInfo to determine if its the "SQL Server Setup" and that the version is the one I am expecting, or newer. If it is, then it writes the setting to a registry key which the installer can then use to call the setup program the way I expect it. If the key doesn't exist, or the field is blank, then the installer downloads the full MSDE installer from a web source and runs the MSI to install. Ends up, this solves all my concerns. Thanks for the feedback. Posted by: Dana Epp at November 25, 2005 02:30 AMThe reason for the multiple MSIs is so that the different instances of SQL Server/MSDE on your machine - you can have up to 15 named instances plus a default instance - have different product GUIDs for the installer, so that Windows Installer considers them different products. Reusing an existing setup.exe is probably OK if all the MSIs accompany it, but if it's been stripped down to just one, you may well find that the setup fails because an instance using that product GUID is already present. Posted by: Mike Dimmick at November 27, 2005 01:39 PMI've had to deal with the coding end of MSDE installations, and they aren't pretty. For starters, as Dana has found, you've got a 25MB CAB file, and a 1.6MB MSI file to distribute. However, this MSI file only works with a single instance of MSDE. If you want a different, instance, you need a different MSI file... The product I was working on needed to support installing different instances of MSDE, but the company didn't want to ship all 16 MSI files. I ended up finding the differences between each MSI file (a couple of metadata GUIDs and 1 or 2 properties, from memory) and wrote a tool that would modify one MSI file to look like another. It worked well, but wasn't pretty from a technical viewpoint. As Chad noted, each instance is a seperate install of SQL/MSDE. This means more memory usage, separate copies of binaries, etc. All up, it's easier to modify your product to use an existing SQL/MSDE instance than it is to install a new instance. Also watch out for service pack updates for MSDE. They're particularly nasty. If you don't get the command-line options right, the update won't install. Posted by: Jamie Anderson at November 28, 2005 12:51 PM |
![]() ![]()
My 5 Favorite Books
Writing Secure Code
Secure Programming Cookbook Security Engineering Secure Coding Principles & Practice Inside the Security Mind ![]()
My 5 Favorite Papers
Smashing the Stack
Penetration Studies Covert Channel Analysis of Trusted Systems DoD Trusted Computer System Evaluation Criteria NSA Security Recommendation Guides ![]()
Archives
November 2006
October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 June 2003 May 2003 April 2003 March 2003 February 2003 January 2003 December 2002 November 2002 October 2002 September 2002 August 2002 July 2002 ![]() |
|