VB6 Custom Installer for MSSQL Software Application

Previously, we looked at Installing MSSQL Together With Software Application where we use batch file (command prompt) to perform the following three things.
  1. Install MSSQL 2005
  2. Setup database using osql
  3. Install the software application
However, the method illustrated has the following flaws:
  1. Doesn’t run well with Vista (if you just double click the SetupTas.bat)
    Unlike Windows XP, Vista default each ‘command prompt run as administrator’ to ‘C:\Windows\System32’, thus after you have run SetupTas.bat, it will not find any file through the related folder ‘.\’

  2. ‘osql’ utility will not work when the machine was freshly installed with MSSQL 2005.


Problem 1:

We need a way to set the relative path to the CD ROM. To that, we will create a custom installer (using VB6) which will point to the relative path of SetupTas.bat

Problem 2:

Since ‘osql.exe’ is a utility which doesn’t required to be installed, it can be copied into the CD (together with its dependencies file) and we can invoke it from the CD itself.

Check out here for full description.

And download the custom installer code(VB6) or here (Planet Source Code).
Reblog this post [with Zemanta]