Skip to content

Commit

Permalink
Merge pull request #2 from steph78630/master
Browse files Browse the repository at this point in the history
Update runningDatabaseInstances.vbs
  • Loading branch information
gillesdubois authored Sep 19, 2017
2 parents 29abcb6 + 63ef573 commit 22e4bc2
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions agent/Windows/runningDatabaseInstances.vbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
'-------------------------------------------------------------------------------
' OCSINVENTORY-NG
' Web : http://www.ocsinventory-ng.org
'
' Liste les bases de données SQL Server du poste
'----------------------------------------------------------
' Plugin for OCS Inventory NG 2.x
' Script : Liste les bases de données SQL Server du poste
' Version : 1.00
' Date : 21/10/2011
' Author : Sylvie Grimonpont
'----------------------------------------------------------
' OS checked [X] on 32b 64b (Professionnal edition)
' Windows XP [ ]
' Windows Vista [ ] [ ]
' Windows 7 [ ] [ ]
' Windows 8.1 [ ] [ ]
' Windows 10 [ ] [ ]
' Windows 2k8R2 [ ]
' Windows 2k12R2 [ ]
' Windows 2k16 [ ]
' ---------------------------------------------------------
' NOTE : No checked on Windows 8
' 4 données sont remontées :
' - strSQLName : Nom long du produit SQL Server
' Par exemple : "Microsoft SQL Server 2008 R2"
Expand All @@ -12,16 +25,7 @@
' Par exemple : "Enterprise Edition (64-bit)"
' - strVersion : Version "chiffrée".
' Par exemple : "8.00.194"
'
' Auteur : Sylvie Grimonpont
' Date : 21-10-2011
' Version : 1.0.0
'
' This code is open source and may be copied and modified as long as the source
' code is always made freely available.
' Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
'-------------------------------------------------------------------------------

' ---------------------------------------------------------
On Error Resume Next

'Déclaration des constantes
Expand Down Expand Up @@ -194,14 +198,14 @@ If Err = 0 Then

' Le format remonté est spécifique à un process interne. A vous d'adapter en fonction de vos besoins. :-)

Wscript.Echo "<DBINSTANCES>"
Wscript.Echo "<PUBLISHER>Microsoft Corporation</PUBLISHER>"
Wscript.Echo "<NAME>" & strSQLName & "</NAME>"
Wscript.Echo "<VERSION>" & strVersion & "</VERSION>"
Wscript.Echo "<EDITION>" & strEdition & "</EDITION>"
Wscript.Echo "<INSTANCE>" & strServiceName & "</INSTANCE>"
Wscript.Echo "</DBINSTANCES>"

Wscript.Echo _
"<DBINSTANCES>" & VbCrLf &_
"<PUBLISHER>Microsoft Corporation</PUBLISHER>" & VbCrLf &_
"<NAME>" & strSQLName & "</NAME>" & VbCrLf &_
"<VERSION>" & strVersion & "</VERSION>" & VbCrLf &_
"<EDITION>" & strEdition & "</EDITION>" & VbCrLf &_
"<INSTANCE>" & strServiceName & "</INSTANCE>" & VbCrLf &_
"</DBINSTANCES>"
Next
Else
WriteError()
Expand Down

0 comments on commit 22e4bc2

Please sign in to comment.