Old 3rd January 2004, 05:01   #1
vrtata
Junior Member
 
Join Date: Mar 2002
Location: India
Posts: 7
Send a message via Yahoo to vrtata
Question MSDE Installation

I want to use NSIS to install MSDE 2000. I require help in the following areas.

1. Check if a particular version of MSDE is Installed.
2. Upgrade if the MSDE version is older than 2000.
3. Installation of MSDE through merge modules.

I have done this through the windows installer but it bugs me. I need to achieve this through NSIS (I am in love with it).

Appreciate any help.

Ramesh
vrtata is offline   Reply With Quote
Old 3rd January 2004, 10:32   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
http://support.microsoft.com/default...b;en-us;321185
Joost Verburg is offline   Reply With Quote
Old 3rd January 2004, 11:10   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
To install the merge modules you can create a small silent .msi which will include them and install it using:

ExecWait '"$SYSDIR\msiexec.exe" /i "C:\path\to\mymsi.msi" /qn'

On the downside, you'd still need MSI runtimes installed if MSM is the only thing you have access too.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 5th January 2004, 03:21   #4
vrtata
Junior Member
 
Join Date: Mar 2002
Location: India
Posts: 7
Send a message via Yahoo to vrtata
But how do I find out during the process of Installation that MSDE is installed or not. My installation package needs to check for two things before it decides on the installation methodology.

1. Check if .NET Framework is installed (a function is already available with NSIS to check this)
2. To check if MSDE is installed or not. If NOT then the installation needs to invoke the MSDE Installation process also.

Rgds
vrtata is offline   Reply With Quote
Old 5th January 2004, 07:09   #5
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
See that Microsoft page for registry keys you have to check.
Joost Verburg is offline   Reply With Quote
Old 7th January 2004, 06:40   #6
mbuckbee
Junior Member
 
Join Date: Jan 2004
Posts: 1
I saw that there is a plug-in to check for services, etc.

You could use that to look for the existence of the MSDE service.
mbuckbee is offline   Reply With Quote
Old 13th January 2004, 02:38   #7
Olomite
Junior Member
 
Join Date: Jun 2003
Location: San Diego
Posts: 16
Question HELP!

I'd like to run MSDE2000 setup.exe using ExecWait. But when I kick off the msde installer my installer keeps going without waiting for msde to finish installing.

How do I get my installer to wait for the msde2000 install to finish?

Any help would be great!

Thanks-
Lance
Olomite is offline   Reply With Quote
Old 13th January 2004, 14:29   #8
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
It's probably a self-extracting archive that starts a different application. Maybe you can extract it using an archive application that supports CAB compression (which is the compression Microsoft uses for most installers).
Joost Verburg is offline   Reply With Quote
Old 13th January 2004, 16:35   #9
Olomite
Junior Member
 
Join Date: Jun 2003
Location: San Diego
Posts: 16
Can anyone expand on this? -> has anyone done this and gotten it to work? if so what'd you use? any other suggestions?

thanks-
Olomite is offline   Reply With Quote
Old 13th January 2004, 17:15   #10
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
I don't know what kind of installer it is, it's just a suggestion. Most common archivers support CAB compression, it won't be difficult to find out.
Joost Verburg is offline   Reply With Quote
Old 13th January 2004, 17:48   #11
Olomite
Junior Member
 
Join Date: Jun 2003
Location: San Diego
Posts: 16
sorry
Olomite is offline   Reply With Quote
Old 13th January 2004, 17:58   #12
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Did you try to extract that installer (setup.exe)?

Last edited by Joost Verburg; 13th January 2004 at 20:20.
Joost Verburg is offline   Reply With Quote
Old 13th January 2004, 20:01   #13
Olomite
Junior Member
 
Join Date: Jun 2003
Location: San Diego
Posts: 16
I see a file in the setup directory called SQLRUN.CAB

I'm not sure what to do now to use that.

sorry for the double post earlier.
Olomite is offline   Reply With Quote
Old 13th January 2004, 20:22   #14
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
I mean: Open the file setup.exe itself in a CAB-supporting archiver.
Joost Verburg is offline   Reply With Quote
Old 4th February 2004, 21:46   #15
g8oz
Junior Member
 
Join Date: Feb 2004
Posts: 1
Detecting MSDE

Check this key:

HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Installed Instances

Unfortunately it is REG_MULTI_SZ (an array essentially), and there is no nice way to read those in NSIS.
g8oz is offline   Reply With Quote
Old 4th February 2004, 22:14   #16
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
See the users manual for information about reading REG_MULTI_SZ.
Joost Verburg is offline   Reply With Quote
Old 4th March 2004, 15:27   #17
willykelleher
Junior Member
 
Join Date: Mar 2004
Posts: 7
I wrote a program to install msde and it checks the default instance and installs or upgrades. I am not sure how this will come out after posting. This is probably not a very clean way but I am new.

I also start the service after it is installed or upgraded with another function which determines OS and starts it accordingly. I use an ini file to controll version's of this and other programs in the installer, that I download at the start of the install. I include a default config ini if the installer can't get the config off the net. I believe the method I use to compare versions is inacurate as I am having an issue with another program in the installer with major/minor version numbers where the string length of the newer version is less than the older one and the intcmp fails because of this.

I never fully completed the upgrade part and maybe that is why I have the wait messagebox so it doesn't continue till upgrade is done. The setpw.bat sets the sa password if it is null from the previuos install so the upgrade works

Function UpdateMSDE
Push $R0
readINIStr $R1 "$INSTDIR\CFG\HTTP_CFG.ini" "MSDE" "MinVer"
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion" "CSDVersion"
; dumpstate::debug
StrCmp $R0 "" lbl_no 0
; IntCmp $R0 "8.00.194" lbl_done lbl_up lbl_done
; IntCmp $R0 "8.00.760" lbl_done lbl_up lbl_done
Push $R0
Push "."
Call RemoveStr
Pop $R0
Push $R1
Push "."
Call RemoveStr
Pop $R1
IntCmp $R0 $R1 lbl_done lbl_up lbl_done
StrCpy $R0 'OK'
GoTo lbl_done
lbl_up:
MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON1 \
"MSDE Version $R0 Needs Updating to $R1 Would you like me to try: ?" IDNO lbl_done
SetOutPath "$INSTDIR\"
!ifdef INS_MSDE
call DLMSDE
!endif
!ifndef INS_MSDE
File /r ${QPS_IN}\MSDE
!endif

ExecWait '"$INSTDIR\MSDE\setpw.bat"'
ExecWait '"$INSTDIR\MSDE\Setup.exe" /l $INSTDIR\msdeup.log /upgradesp SQLRUN INSTANCENAME=MSSQLServer SECURITYMODE=SQL UPGRADEUSER=sa UPGRADEPWD=password'
MessageBox MB_OK "WAIT"
Goto lbl_done
lbl_no:
;SetOutPath "$INSTDIR\MSDE"
SetOutPath "$INSTDIR\"
!ifdef INS_MSDE
call DLMSDE
goto lbl_ins
!endif
!ifndef INS_MSDE
File /r ${QPS_IN}\MSDE
!endif
lbl_ins:
MessageBox MB_OK "INSTALLING MSDE"
call updateMSDEPath
ExecWait '"$INSTDIR\MSDE\Setup.exe" /l $INSTDIR\msde.log SQLRUN SECURITYMODE=SQL SAPWD=password'
StrCpy $R0 'NO'
Goto lbl_done
lbl_done:
call startMSDE
SectionGetFlags ${SecM3} $R1
IntOp $R2 $R1 & 0x80000000
IntCmp $R2 0 Start Skip
Start:
call StartApps
goto done
Skip:
!define MSDE_ONLY "TRUE"
done:
Exch $R0
FunctionEnd

Last edited by willykelleher; 4th March 2004 at 17:08.
willykelleher is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump