"""
from sys import exit
import time, win32api, win32con, win32service
wa, wc, ws = win32api, win32con, win32service
import WService
iis = WService.WService("IIS Admin")
iis.fetchstatus("stopped")
print "IIS Stopped"
class WService:
"""
The WService Class is used for controlling WinNT, Win2k & WinXP like
services. Just pass the name of the service you wish to control to the
class instance and go from there. For example, if you want to control
the Workstation service try this:
import WService
workstation = WService.WService("Workstation")
workstation.start()
workstation.fetchstatus("running", 10)
workstation.stop()
workstation.fetchstatus("stopped")
huffmanp;30014 wrote:
Now the script throws an error "ImportError: No module named WService" when I run on the field office server, although back at my office it found WService Class just fine in line within the script. What could be the difference between these scripting environments?
Awesome. After installing ArcGIS 10.4 i faced a similar problem and the tweak worked after setting "PYTHOPATH" environment variable