Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
omid5ive
Creator II
Creator II

check windows service in qlikview

hi

i need some macro that can check some windows service for example (fax) and show he status in my document

i know the command of this is "sc query fax"

how can i use it in qlikview?

1 Solution

Accepted Solutions
Not applicable

hi,

I tried a solution by using .bat file.

plese find the atached files

Niranjan M.

View solution in original post

4 Replies
Not applicable

hi,

I tried a solution by using .bat file.

plese find the atached files

Niranjan M.

omid5ive
Creator II
Creator II
Author

hi niranjan

thanx for you answer

Anonymous
Not applicable

Omid,

i've made this

strComputer = "."

Const ForAppending = 8

Dim fso, f  

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.OpenTextFile("e:\Qlikview Server Logs\Services_XDWHQVIEW03B.csv",ForAppending,true)

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")

Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Service Where Name = 'QlikViewDistributionService' or Name='QlikviewManagementService'")

For Each objItem in colItems

    f.writeLine(now()& ";" & "XDWHQVIEW03B;"& objItem.Name & ";" & objItem.State)

Next

Set colItems = Nothing

Set objWMIService = Nothing

this script gives me the statut of my service on a file log with timestamp.

omid5ive
Creator II
Creator II
Author

Thank u nassim