Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

recenser les plugins

Bonjour,

je suis nouveau sur OCSInventory, j'ai installé la dernière version sur un serveur Ubuntu 12.04

J'ai installé l'agent sur plusieurs postes windows avec le plugins "officekeys"

J'aurais souhaité savoir sur quels postes est installé le plugin. Au cas où j'en aurais oubliés.

 

Est ce qu'il y aurait moyen dans l'interface web ou autre, de savoir quels postes utilisent quels plugins?



merci de votre aide.

----------------------

Google translate in case:

 

hello,

I am new to OCSInventory, I installed the latest version on Ubuntu Server 12.04

I installed the agent on several windows machines with plugins "officekeys"

I wish to know about what positions are installed the plugin. If I would have forgotten.

 

Is there any way in the web interface or otherwise, to know what positions using which plugins?



thank you for your help

 

in Administrative console by (260 points)
retagged by

6 Answers

0 votes
by (88.5k points)
0 votes
Bonjour,

tout d'abord merci pour la réponse rapide, mais je pense que je me suis mal exprimer.

J'ai installé le plugin OFFICEKEY sur mes postes, ça ça fonctionne, je peux voir les différentes clé Office remontée dans l'interface, pas de problème.

Ce que je cherche à savoir c'est si il y a un moyen de savoir quels postes a quels plugin dans son répertoire plugins.

Par exemple j'installe le plugin OFFICEKEY sur 50 postes, dans l'interface web il me remonte que 44 clé d'office. Donc j'en conclu que soit le plugin n'est pas installé sur 6 postes, soit 6 postes n'ont pas Office d'installé, soit 6 postes ont un office supérieur à 2010.

Dans ma socièté certains postes n'ont pas Office d'installé ou ont un 2013 d'installé donc il est normal qu'ils ne remonte pas dans l'interface Web. Mais si je me suis loupé lors de l'instalation du plugin alors les postes peuvent avoir un Office d'installé (autre que 2013) mais je ne vois aucune remonté dans l'interface web.

Donc je cherche un moyen d'avoir une vue du contenu du répertoire plugin de chaque postes pour être sûr que le ou les scripts des plugins sont bien présent dans le répertoire d'installation de l'agent d'OCS.

Dans mon exemple je parle du plugin offcekey mais cela vaut pour n'importe quel plugin.

merci de votre aide
by (260 points)
+1 vote
Bonjour,

Dans ce cas, il faut écrire un script shell dos ou un script vbs qui fera le comptage des plugins dans le répertoire c:\program files\ocs inventory ng\agent\plugins.
by (88.5k points)
+1 vote

Je viens de créer ce script qui fonctionne pour moi et qui le liste le contenu du dossier C:\Program Files\OCS Inventory Agent\Plugins

Option Explicit
 
Const STR_ROOT_FOLDER_PATH = "C:\Program Files\OCS Inventory Agent\Plugins"
Const INT_MAX_LEVELS = 3
 
Dim objOutputFile, objShell, objFso, timeStart, objFolder
 
Set objFso = CreateObject("Scripting.FileSystemObject")
If NOT objFso.FolderExists(STR_ROOT_FOLDER_PATH) Then Wscript.Quit 100
 
Set objFolder = objFso.GetFolder(STR_ROOT_FOLDER_PATH)
'Set objOutputFile = objFso.CreateTextFile(STR_OUTPUT_TXT_FILE,True)
 
BrowseFolder objFolder, 0, INT_MAX_LEVELS, False
 
Sub BrowseFolder(objRootFolder, intCurrenLevel, intLevelMax, boolLastFolder)
Dim objFso, colSubFolders, objFile, objSubFolder, colFiles, intNbItems, intLastItem, boolLastItem
On Error Resume Next
Set colSubFolders = objRootFolder.subFolders
Set colFiles = objRootFolder.Files
 
intNbItems = 0
intLastItem = colSubFolders.Count
boolLastItem = False
For Each objSubFolder in colSubFolders
intNbItems = intNbItems + 1
If intNbItems = intLastItem Then boolLastItem = True
If intCurrenLevel <= intLevelMax Then BrowseFolder objSubFolder, intCurrenLevel + 1, intLevelMax, boolLastItem
Next
 
intNbItems = 0
intLastItem = colFiles.Count
boolLastItem = False
For Each objFile in colFiles
intNbItems = intNbItems + 1
If intNbItems = intLastItem Then boolLastItem = True
WScript.Echo "<SOFTWARES>" 
WScript.Echo "<PUBLISHER>Bimedia Plugin</PUBLISHER>"
WScript.Echo "<NAME>" & objFile.Name & "</NAME>"
WScript.Echo "<VERSION>" & objFile.Version & "</VERSION>"
WScript.Echo "<FOLDER>" & objFile.ParentFolder & "</FOLDER>"
WScript.Echo "<FILENAME>" & objFile.FileName & "</FILENAME>"
WScript.Echo "<FILESIZE>" & objFile.FileSize & "</FILESIZE>"
WScript.Echo "<INSTALLDATE>" & objFile.CreationDate & "</INSTALLDATE>"
Wscript.Echo "<COMMENTS>Plugin OCS</COMMENTS>"
WScript.Echo "</SOFTWARES>" 
Next
End Sub
 
Function RepeatString (strInputString, intNbIteration)
Dim i
RepeatString = ""
i = 0
Do While i < intNbIteration
RepeatString = RepeatString  & strInputString
i = i + 1
Loop
End Function
 
Function IncrementTree (intNbIteration, boolLastItem)
Dim strEol
IncrementTree = ""
If intNbIteration = 0 Then Exit Function
strEol = "|--&nbsp;"
If boolLastItem = True Then strEol = "`--&nbsp;"
IncrementTree = RepeatString("|&nbsp;&nbsp;&nbsp;", intNbIteration - 1) & strEol
End Function
 
Voila à toi de l'adapter en fonction de tes besoins. Les fichiers remontent dans la section software de OCS.
by (200 points)
0 votes

Bonjour,

merci beaucoup pour votre aide, j'avais commencé à faire un script mais le tiens est beaucoup plus avancé. Ca fait exactement ce que je souhaité

je me suis permis de le modifier un petit peu car j'ai des postes sous XP, seven, etc... et ce n'est pas forcément le même répertoire d'installation.

 Option Explicit
 

Const STR_ROOT_FOLDER_PATH_XP = "C:\Program Files\OCS Inventory Agent\Plugins"
Const STR_ROOT_FOLDER_PATH_SEVEN = "C:\Program Files (x86)\OCS Inventory Agent\Plugins"


Const INT_MAX_LEVELS = 3
 
Dim objOutputFile, objShell, objFso, timeStart, objFolder
 
Set objFso = CreateObject("Scripting.FileSystemObject")

'If NOT objFso.FolderExists(STR_ROOT_FOLDER_PATH) Then Wscript.Quit 100

If objFso.FolderExists(STR_ROOT_FOLDER_PATH_XP) Then
    Set objFolder = objFso.GetFolder(STR_ROOT_FOLDER_PATH_XP)
    ElseIf objFso.FolderExists(STR_ROOT_FOLDER_PATH_SEVEN) Then
        Set objFolder = objFso.GetFolder(STR_ROOT_FOLDER_PATH_SEVEN)
    Else Wscript.Quit 100
End If

 
'Set objFolder = objFso.GetFolder(STR_ROOT_FOLDER_PATH)
'Set objOutputFile = objFso.CreateTextFile(STR_OUTPUT_TXT_FILE,True)

 
BrowseFolder objFolder, 0, INT_MAX_LEVELS, False
 
Sub BrowseFolder(objRootFolder, intCurrenLevel, intLevelMax, boolLastFolder)
Dim objFso, colSubFolders, objFile, objSubFolder, colFiles, intNbItems, intLastItem, boolLastItem
On Error Resume Next
Set colSubFolders = objRootFolder.subFolders
Set colFiles = objRootFolder.Files
 
intNbItems = 0
intLastItem = colSubFolders.Count
boolLastItem = False
For Each objSubFolder in colSubFolders
intNbItems = intNbItems + 1
If intNbItems = intLastItem Then boolLastItem = True
If intCurrenLevel <= intLevelMax Then BrowseFolder objSubFolder, intCurrenLevel + 1, intLevelMax, boolLastItem
Next
 
intNbItems = 0
intLastItem = colFiles.Count
boolLastItem = False
For Each objFile in colFiles
intNbItems = intNbItems + 1
If intNbItems = intLastItem Then boolLastItem = True
WScript.Echo "<SOFTWARES>"
WScript.Echo "<PUBLISHER>Plugin OCS</PUBLISHER>"
WScript.Echo "<NAME>" & objFile.Name & "</NAME>"
WScript.Echo "<VERSION>" & objFile.Version & "</VERSION>"
WScript.Echo "<FOLDER>" & objFile.ParentFolder & "</FOLDER>"
WScript.Echo "<FILENAME>" & objFile.FileName & "</FILENAME>"
WScript.Echo "<FILESIZE>" & objFile.FileSize & "</FILESIZE>"
WScript.Echo "<INSTALLDATE>" & objFile.CreationDate & "</INSTALLDATE>"
Wscript.Echo "<COMMENTS>Plugin OCS</COMMENTS>"
WScript.Echo "</SOFTWARES>"
Next
End Sub
 
Function RepeatString (strInputString, intNbIteration)
Dim i
RepeatString = ""
i = 0
Do While i < intNbIteration
RepeatString = RepeatString  & strInputString
i = i + 1
Loop
End Function
 
Function IncrementTree (intNbIteration, boolLastItem)
Dim strEol
IncrementTree = ""
If intNbIteration = 0 Then Exit Function
strEol = "|--&nbsp;"
If boolLastItem = True Then strEol = "`--&nbsp;"
IncrementTree = RepeatString("|&nbsp;&nbsp;&nbsp;", intNbIteration - 1) & strEol
End Function

En vert ce que j'ai modifié.

En tout cas encore merci pour votre aide. smiley

by (260 points)
0 votes

Bonjour,

désormais un plugin qui réalise ce que vous demandez est disponible au téléchargement :

List of plugins scripts folder

Cordialement, Stéphane

by (32.6k points)
 
Powered by Question2Answer
...