Thank you for the script.
Can this script be integrated into the script that I use to install my own application?
Main Topics
Browse All TopicsHi,
How can I install SQL Server 2005 Express with INNO setup. Does anybody done this and can explain it to me? The things that I would like to accomplish are:
Check if (an older version of) SQL Server is already installed (or when the user wants to install another instance of it)
- install SQL Server 2005 Express unattended with parameters
Installation will only be done on Windows XP, Vista and Windows Server 2003.
I would appreciate a description as detailed as possible, so I know how to set thing up correctly. Maybe somebody is willing to share a INNO Setup projectfile where this is done.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: tigin44Posted on 2008-11-02 at 04:52:21ID: 22861187
hi DelphiWizard
"compiler: Default.is l"
rybs.kkk.t sk bs.kkk.tsk bs.kkk.tsk 07 7
Dir:String );
NameString +'\SQLSERV ER'; LServer'); rName);
tabase');
File');
PRIMARY'). DBFiles.Ad d(DBFile);
gFile');
gFiles.Add (LogFile);
YesNo)=idY es)) then
L_MACHINE, 'SOFTWARE\Microsoft\Micros oft SQL Server\AnyDataBase\SETUP', 'SQLPath') ) or (SQLKur=False)) then //Exists or do not install
"; WorkingDir: {app}\SQL Server 2005 Express; StatusMsg: SQL Server Setup;Check:SQLKontrol
an Inno script like below can help you
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Languages]
Name:English;MessagesFile:
[Setup]
AppName=EgtMrk2007
AppVerName=Eitim Merkezleri Veri Giri_ Uygulamas1 V.1.0
AppPublisher=K.K.Personel Ba_kanl11 YBS ^. Md.lüü
AppPublisherURL=https://pe
AppSupportURL=https://pery
AppUpdatesURL=https://pery
DefaultDirName=c:\EgtMrk20
DefaultGroupName=EgtMrk200
AllowNoIcons=yes
Compression=lzma
SolidCompression=yes
[Code]
const
SQLDMOGrowth_MB = 0;
var
SqlKurma:Boolean;
procedure SQLDMOButtonOnClick(SDir,D
var
SQLServer, Database, DBFile, LogFile: Variant;
SQLServerName:string;
i,j:integer;
egtmrkC:boolean;
begin
if SQLKurma=True then exit;
egtmrkC:=False;
{Named instance SQLSERVER}
SQLServerName:=GetComputer
{ Create the main SQLDMO COM Automation object }
try
SQLServer := CreateOleObject('SQLDMO.SQ
except
RaiseException('Please install Microsoft SQL server connectivity tools first.'#13#13'(Error ''' + GetExceptionMessage + ''' occurred)');
end;
{ Connect to the Microsoft SQL Server }
SQLServer.LoginSecure := True;
try
SQLServer.Connect(SQLServe
except
RaiseException('SQL Server is not installled or the service is not started.'#13#13'(Error ''' + GetExceptionMessage + ''' occurred)');
exit;
end;
{ Setup AnyDataBase }
Database := CreateOleObject('SQLDMO.Da
Database.Name := 'AnyDataBase';
DBFile := CreateOleObject('SQLDMO.DB
DBFile.Name := 'AnyDataBase_Data';
DBFile.PhysicalName :=DDir+'\AnyDataBase.mdf';
DBFile.PrimaryFile := True;
DBFile.FileGrowthType := SQLDMOGrowth_MB;
DBFile.FileGrowth := 1;
Database.FileGroups.Item('
LogFile := CreateOleObject('SQLDMO.Lo
LogFile.Name := 'AnyDataBase_Log';
LogFile.PhysicalName :=DDir+'\AnyDataBase.ldf';
Database.TransactionLog.Lo
end;
Function SQLKur:Boolean;
begin
if ((msgBox ('Do you want to install SQL Server?',mbinformation,mb_
Result:=True
else
begin
Result:=False;
SQLKurma:=True;
end;
end;
Function SQLKontrol:Boolean;
Var
PortNum:string;
begin
if ((RegValueExists(HKEY_LOCA
Result:=False
else Result:=True;
end;
[Tasks]
[Files]
Source: "c:\SQL Server 2005 Express\*" ; DestDir: "{app}\SQL Server 2005 Express"; Flags: onlyifdoesntexist
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Run]
Filename: "{app}\SQL Server 2005 Express\setup.exe" ; Parameters: "SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 SAPWD=""AnyPassword"" instancename=""SQLSERVER""
[Icons]
[Run]