- NSIS Discussion
- MSDE Installation
Archive: MSDE Installation
vrtata
3rd January 2004 06:01 UTC
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
kichik
3rd January 2004 12:10 UTC
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.
vrtata
5th January 2004 04:21 UTC
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
Joost Verburg
5th January 2004 08:09 UTC
See that Microsoft page for registry keys you have to check.
mbuckbee
7th January 2004 07:40 UTC
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.
Olomite
13th January 2004 03:38 UTC
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
Joost Verburg
13th January 2004 15:29 UTC
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).
Olomite
13th January 2004 17:35 UTC
Can anyone expand on this? -> has anyone done this and gotten it to work? if so what'd you use? any other suggestions?
thanks-
Joost Verburg
13th January 2004 18:15 UTC
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.
Olomite
13th January 2004 18:48 UTC
sorry
Joost Verburg
13th January 2004 18:58 UTC
Did you try to extract that installer (setup.exe)?
Olomite
13th January 2004 21:01 UTC
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.
Joost Verburg
13th January 2004 21:22 UTC
I mean: Open the file setup.exe itself in a CAB-supporting archiver.
g8oz
4th February 2004 22:46 UTC
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.
Joost Verburg
4th February 2004 23:14 UTC
See the users manual for information about reading REG_MULTI_SZ.
willykelleher
4th March 2004 16:27 UTC
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