ASP & WMI

This is a discussion about ASP & WMI in the Everything Windows category; Yeah. . . old news :-).

This topic was started by , . Last reply by ,


data/avatar/default/avatar02.webp

139 Posts
Location -
Joined 2003-01-19
I would like to make 2 vbscript functions to put on an ASP page

1) I would like help with a function to display whether a certain process is running
2) I would somehow like to obtain the currently playing winamp song (perhaps a spinoff of #1, wherein the title of winamp is parsed and the song name extracted if that process is running)

I have code that works with windows scripting (ie as a .vbs file) for #1 but not with ASP server side scripting, please help

Set wbemObjectSet = _
GetObject("winmgmts://").InstancesOf("Win32_Process")

For Each wbemObject In wbemObjectSet
If LCase(wbemObject.Name) = "wmenc.exe" Then IsRunning=TRUE
Next
If IsRunning = "" Then IsRunning = FALSE

with WScript it works, when i throw it in an asp file I get an error

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.