' ' $Id: //websites/unixwiz/unixwiz.net/webroot/evo/evoRegdServiceLogon.vbs#2 $ ' ' written by : Stephen J. Friedl ' Software Consultant ' Tustin, California USA ' http://www.unixwiz.net/evo/evo-logon-service.html ' ' This VBScript program uses WMI to program the service logon ' account information for the Evolution Registration Daemon: this ' is required after a version upgrade, and it requires that it ' be configured with the account name and password of interest. ' ' *This is a security risk* - use with caution. ' Dim serviceUser Dim servicePass serviceUser = "*EDIT USERNAME HERE*" servicePass = "*EDIT PASSWORD HERE*" Set objWMIService = GetObject( _ "winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set colServiceList = objWMIService.ExecQuery( _ "Select * from Win32_Service " & _ "where Name = 'RegistrationDaemonService'") newline = chr(13) & chr(10) msg = "" For Each objservice in colServiceList r = objService.Change( , , , , , , serviceUser, servicePass) if r = 0 then msg = msg & "Updated logon for " & objService.Name & " ok" else msg = msg & "ERROR: could not update logon for " & objService.Name End If msg = msg & newline Next if msg = "" then msg = "ERROR: could not find Registration Daemon service" Else msg = msg & newline msg = msg & "Remember to restart the service" End If WScript.Echo msg