How to configure Inno SetUp Or PWD to install all software at once

Hello,
Please i need help on how i can package a Setup CD for my Application written in VB6.0, SQL Server 2005 Express (Stored Procedures). The Setup should install all prerequisite Software, Add Username/Password for my SQL installation, block SQL USer from viewing my Database structure and Stored Procedure using MGT Studio Express. Also configuring an online installation package.
M_ProgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mirtheilCommented:
You can install SqlExpress either in the [ Code] or [Run] section of InnoSetup.  The example below shows how to install the .NET framework but it could be changed to install Sql Express.  You can use the same concept to execute the SQL statements to create tables, stored procedures, and database security using osql and an SQL file included in your script.  
 
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{1F30C2F6-6C7A-4A20-A08E-191A295AD08C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "c:\util\innosetup\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  Source: "c:\util\innosetup\Examples\dotnetfx.exe"; DestDir: {tmp}; Flags: ignoreversion dontcopy 

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&", "&&")}}"; Flags: nowait postinstall skipifsilent


[code]
function InitializeSetup(): Boolean;
var
    ErrorCode: Integer;
    NetFrameWorkInstalled : Boolean;
    Result1 : Boolean;
    sVer : string;
begin
      NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0');
      if NetFrameWorkInstalled =true then
        begin
        //.NET Framework v2 is currently installed so nothing needs to be done.
            Result := true;
        end
      else
        begin
          //Run the .NET redistributable here using shellexec
          ExtractTemporaryFile('dotnetfx.exe');
          if Exec(ExpandConstant('{tmp}\dotnetfx.exe'), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
            begin
              // handle success if necessary; ResultCode contains the exit code
              Result := true;
            end
          else begin
            // handle failure if necessary; ResultCode contains the error code
            Result := false;
          end;
        end;
      end;
end;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
M_ProgAuthor Commented:
Hello mirtheil,
Thanks for the reply but am new to inno setup, never used it before and also never used to setup any application. Please could help state procedures and also considering prerequisite installation which the setup has to check its existence before continuing installation.

I mean Windows Installer 3.1 needs to be checked, if not present then install, also .Net Framework 2.0 while the sql express needs to be installed with Username and password cos the application references to Username and Password.

Thanks again
0
mirtheilCommented:
I've given you an example that you can look at that is a good base for what you are trying to do with InnoSetup.  Have you looked at the install?  Do you have any specific questions about it?  

InnoSetup does not use Windows Installer so you don't need to check it when running InnoSetup installs.  As far as other prerequisites, the installers for those pieces will do what they need to do.  

As I stated, I don't use SQL Express so I don't know how to install it with a username and password.  If there's a command line option for SQL Express that you can pass to set the username / password, then you can use that command line from within InnoSetup to run the SQL Express install.  
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

M_ProgAuthor Commented:
Ok thanks i understand every bit of your comment but my question is prerequisite for installing SQL Server Express on systems like Windows XP is Windows Installer 3.1, .Net Framework 2.0. I think i got some link to putting username and password to SQl Server Express installation via command prompt but how do i incorporate that into Inno SetUp.
0
mirtheilCommented:
To check for the MSI version, you can check the version of MSI.DLL.  You can get the location of the DLL by looking at the InstallerLocation value of the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer.  
I've given you the example for .NET 2.0.  
You can modify the example to run the SQL Server Express install.  Instead of using the dotnetfx.exe, you would use the SQL Server Express executable.

This is not the place, if you want a script written for you.  We can offer help and suggestions.  If you want the script written for you, you need to look other places.
0
M_ProgAuthor Commented:
Ok please where is the location to get the complete script of installing WindowsInstaller 3.1,.Net Framework 2.0, SQL Server Express with username and password, Attach Database, Run Stored Procedures, and allow user input counts during Application SetUp.
Thanks i appreciate you
0
mirtheilCommented:
I know of no site that has the exact script you are looking for.  You might need to find a consultant that knows InnoSetup and would be willing to write one for you for a fee.  Something like you are describing shouldn't take too long.  
0
M_ProgAuthor Commented:
Ok Mirtheil, Please help do that or refer me, would pay for the service and hope its in my budget. I really would appreciate this cos i really want to package my longtime design application. Also hope its compatible with windows 7 and other operating system.

Please help do this as immediate as possible.

Thank you
0
Richard DanekeTrainerCommented:
Packaging and distributing software can be very complex.   It varies on how many different platforms you are installing into and how diverse your applications are in software development.
This is a dated article, but Windows environments are mostly using the MSI installation packages and this may offer the overview you need to look further.
http://www.windowsnetworking.com/articles_tutorials/msi-packaging-tools.html
0
M_ProgAuthor Commented:
Please i thought i should be getting closer to a solution on how Inno SetUP works or better any standard SetUP package to complete my Application Process.

Or Please could PWD be used to package an application that requires checking if SQL Server Express is installed on the target machine, if not Install it alongside its prerequisite, also allows executing Stored procedure, creating table and so on.

Thank you
0
Vadim RappCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.