Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Help with vbscript and windows nt

Help with vbscript and windows nt

Scheduled Pinned Locked Moved Web Development
helpasp-nettoolsquestioncareer
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Its due when
    wrote on last edited by
    #1

    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 %>

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups