Help with vbscript and Windows NT
-
Hi Guys, Well I'm totally stumped. I've got a bit of vbscript code that tries to find a particular process running on a machine (Windows NT). If the process exists I want the text ("I am running...") displayed. If it doesn't exist then I want the text ("I am not running") displayed. Just some background on the OS. Its Win NT 4 service pack 6 and i reinstalled WMI Core 1.5 On win xp, win 2k and win 2k3 the script below works fine. However on windows nt where this will reside on it fails giving me an error 80041001 which I belive is a "Call failed" error. Can anyone shed some light on why this would be happening on NT in particular? Thanks in advance <% Dim strComputer, strProcess strComputer = "." On Error Resume Next Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}! \\" _ & strComputer & "\root\cimv2") Set colProcess = objWMIService.ExecQuery _ ("Select * from Win32_Process") For Each objProcess in colProcess do while objProcess.name = "Someprocess.exe" strProcess = objProcess.name 'objProcess.Name 'If objProcess.name = "Someprocess.exe" then Response.Write ("I am running...") 'Else 'End If Exit Do Loop Next If strProcess = "" then Response.Write ("I am NOT running") End If %>
-
Hi Guys, Well I'm totally stumped. I've got a bit of vbscript code that tries to find a particular process running on a machine (Windows NT). If the process exists I want the text ("I am running...") displayed. If it doesn't exist then I want the text ("I am not running") displayed. Just some background on the OS. Its Win NT 4 service pack 6 and i reinstalled WMI Core 1.5 On win xp, win 2k and win 2k3 the script below works fine. However on windows nt where this will reside on it fails giving me an error 80041001 which I belive is a "Call failed" error. Can anyone shed some light on why this would be happening on NT in particular? Thanks in advance <% Dim strComputer, strProcess strComputer = "." On Error Resume Next Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}! \\" _ & strComputer & "\root\cimv2") Set colProcess = objWMIService.ExecQuery _ ("Select * from Win32_Process") For Each objProcess in colProcess do while objProcess.name = "Someprocess.exe" strProcess = objProcess.name 'objProcess.Name 'If objProcess.name = "Someprocess.exe" then Response.Write ("I am running...") 'Else 'End If Exit Do Loop Next If strProcess = "" then Response.Write ("I am NOT running") End If %>
Does the account the this script is running under have at least PowerUser permissions to the machine you're monitoring? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Does the account the this script is running under have at least PowerUser permissions to the machine you're monitoring? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
How do I set the permissions for users in Windows NT? The interface is not what Im used to and Im not sure how I can change it. Thanks
-
How do I set the permissions for users in Windows NT? The interface is not what Im used to and Im not sure how I can change it. Thanks
What user account is this script running under??? Is this script in a web page?? Does the script run on the server or on the client side?? Are you running it by double-clicking a *.VBS file?? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
What user account is this script running under??? Is this script in a web page?? Does the script run on the server or on the client side?? Are you running it by double-clicking a *.VBS file?? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
The script is in a webpage and runs on the server. How do I determine which account is running that script. I would have though it would have been the IUSR_xxxxxxxx account or am I wrong?
-
The script is in a webpage and runs on the server. How do I determine which account is running that script. I would have though it would have been the IUSR_xxxxxxxx account or am I wrong?
It'll be that account and, No, it doesn't have sufficient rights to do what you want. Add that account to the Power Users group and it'll get the rights it needs. BUT!!! BEWARE!!! This ia a HUGE security risk if your NT server is visible to the Internet. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
It'll be that account and, No, it doesn't have sufficient rights to do what you want. Add that account to the Power Users group and it'll get the rights it needs. BUT!!! BEWARE!!! This ia a HUGE security risk if your NT server is visible to the Internet. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Where do you actually setup the permissions for accounts in Windows NT?