Hi,

it's my first post on this forum.

I try to explain my problem with a bundle creating.
I try to create a bundle that will allow ZCM to check if a service "x" is "started" or not.
If it is "stopped" a message informing the user should appear.

I tried with a script, but I have the following error message: "Exception at the launch: illegal character in path".

I tried with the Requirements option but I only check if the service is installed on the computer. At no time requirments can check the status of the process.

Below is the vbs script.

Code:
 Dim objFSO, objWMIService, objService, colServiceList
 Dim objReseau, Ordinateur
 Dim Reponse
 
 Set objReseau = CreateObject("WScript.Network")
 Ordinateur = LCase(objReseau.ComputerName)
 Set objFSO = CreateObject("Scripting.FileSystemObject")
 Set objWMIService = GetObject("winmgmts:" & _
 "{impersonationLevel=impersonate}!\\" & Ordinateur & "\root\cimv2")
 Set colServiceList = objWMIService.ExecQuery _
 ("Select * from Win32_Service where Name='ntrtscan'")
 For Each objService In colServiceList
 If (objService.Name = "ntrtscan") Then
 	If (objService.State = "Stopped")Then
 Reponse = Msgbox("Service ntrtscan arrêté")
 End If
 End If
 Next
 Set objFSO = Nothing
 Set objReseau = Nothing
WScript.Quit
If anyone has an idea.