Go Back   Winamp Forums > Developer Center > NSIS Discussion

 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 23rd November 2007, 11:58   #1
Swapan Das
Senior Member
 
Join Date: Nov 2005
Location: Kolkata (Calcutta),India
Posts: 106
How to Detect SQL Server 2005 and SQL Express from NSIS

Dear Friends,

From my NSIS installer I'll restore a database of SQL Server 2005. But prior to this act I want to confirm whether the user's system is having SQL Server 2005 or SQL Server 2005 Express Edition (SSE). Please note that I don't need instance names etc. info., just want to know whether SQL 2005 or SSE is there or not.

Please keep in mind that, the user may have other versions of SQL Server installed in his system like MSDE, SQL 2000.


For MSDE/MSSQL I use:
ReadRegStr $R0 HKLM \
"SOFTWARE\Microsoft\MSSQLServer\Setup" SQLPath

For my this issue, I'm trying with the following but someone informed me that it didn't detected his sql express.
Please give better and correct solution then this:

;for sql server 2005
ReadRegStr $R1 HKLM \
"SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" MSSQLSERVER
;for sql express:
ReadRegStr $R2 HKLM \
"SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" SQLEXPRESS


Regards,
Swapan
ps:As usual its need quick response as my installer is just waiting for this check to be bundled in it.
Swapan Das is offline   Reply With Quote
 
Go Back   Winamp 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