Hi Thomas,
  Great to see the WiXRepo is up and running so quickly.

I'm not sure how organized you can make things on codeplex, as I've
never used it, but maybe CustomActions could be grouped per programming
language. So a sub-dir for VB Script and another for C/C++ and C# etc.

How can developers submit things to the project? Do you have to register
to be able to be part of the project?

A more portable solution to this SQLDMO code below would be to use SMO,
as that is supported on SQLServer 2005 and 2008, but VB Script cannot
call static methods, so it seems only a C/C+/C# etc solution would work
for that.

Dominique.

-----Original Message-----
From: Thomas Due [mailto:thomas....@scanvaegt.dk] 
Sent: 02 October 2009 06:47
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] CustomAction : Enumerating SQLServer
Instancesacrossthe network using SQLDMO

This would be perfect for http://wixrepo.codeplex.com/

Also: Looks good, looking forward to playing around with it, although
the company I work for, will have to support 2008 as well in the near
future. 

/Thomas

-----Original Message-----
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com] 
Sent: 1. oktober 2009 18:16
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] CustomAction : Enumerating SQLServer Instances
acrossthe network using SQLDMO

Hi all,
  I couldn't find all this code in one place so I thought this list
might be a good place to archive it.


      Set sqlApp = CreateObject("SQLDMO.Application") 
          
          If ( Err.Number <> 0 ) Then
          wscript.echo "SQLDMO.Application Not found. Error : " &
Err.Number
          wscript.Quit -1
      End If
     
          Set sqlServer2 = CreateObject("SQLDMO.SQLServer2")
          
          If ( Err.Number <> 0 ) Then
          wscript.echo "SQLDMO.SQLServer2 Not found. Error : " &
Err.Number
          wscript.Quit -1
      End If
         
      Set serverList = sqlApp.ListAvailableSQLServers 
     
      numServers = serverList.Count 
     
          Dim x, y
          
          For x = 1 To numServers      
          
                Set instanceList = sqlServer2.ListInstalledInstances(
serverList(x) ) 
                
                if Not ( instanceList is Nothing ) Then
                
                  numInstances = instanceList.Count  
                
                  wscript.echo serverList(x)            
                  For y = 1 To numInstances
                    wscript.echo "    " & instanceList(y)
          Next
                End IF
      Next 
     
          Set sqlServer2 = Nothing 
      Set sqlApp = Nothing


Note SQLDMO only works with SQLServer 2005 and below and is not
installed by default on SQLServer 2008 onwards


Hope this helps someone.


DOMINIQUE LOUIS | IS DEVELOPER, AMX DIGITAL MEDIA GROUP
AMX UK| 6TH FLOOR SALISBURY HOUSE,| LONDON WALL | LONDON | EC2M 5QQ
www.amx.com
AMX

AMX UK
Auster Road
Clifton Moor
York, North Yorkshire
United Kingdom
YO30 4GD

+44 (0) 1904 343100     office
+44 (0) 1904 343101     fax

AMX South
6th Floor Salisbury House
London Wall
London
United Kingdom
EC2M 5QQ

+44 (0) 2076 529450     office
+44 (0) 8701 991661     fax

AMX Belgium
Boerenkrijglaan, 96a
B-2260
Westerlo
Belgium


+ 32 (0) 1454 2763      office
+ 32 (0) 1454 2766      fax

######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This email was scanned and cleared by NetIQ MailMarshal.
######################################################################

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to