Author Topic: wntSvcStatus Error 605  (Read 49 times)

simonf

  • Newbie
  • *
  • Posts: 2
wntSvcStatus Error 605
« on: August 08, 2017, 05:28:22 pm »
I am unable to read service status using wntSvcStatus on windows 10 or windows 2008r2, I get an extender error 605:  Is there any known issues with this function?

I can list the services using wntSvcList though...

; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

state = wntSvcStatus("", "Spooler", 0, 2) ; get the current state of the Spooler
service
Switch state
   Case 1
      message("stopped","service is stopped")
      Break
   Case 4
      message("started","service is running")
      Break
EndSwitch
Exit


td

  • Tech Support
  • *****
  • Posts: 2115
    • WinBatch
Re: wntSvcStatus Error 605
« Reply #1 on: August 08, 2017, 07:30:25 pm »
Use 1000 instead of 0 in the third parameter.  You will have to ask Microsoft why.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


simonf

  • Newbie
  • *
  • Posts: 2
Re: wntSvcStatus Error 605
« Reply #2 on: August 09, 2017, 04:17:30 pm »
Thank you sir, all good now.