Every once in a while it is a good ideal to start and stop the Amicus PE Service. Sometimes Amicus Premium will stop working and no one can get in. At that point, the only fix is to restart the Amicus PE Service. I find that a lot of firms just restart the entire server which in default restarts the Amicus PE Service as well as all the other services.
To make this easier, I have created a Visual Basic Script which will stop and then start the Amicus PE Service. I have labeled it Click to Fix Amicus.vbs and leave it on the client’s server desktop. BE AWARE!!! If you run this while Amicus is working, it will kick everyone out of Amicus. This should only be run when no one can get into Amicus Premium Edition. This will not work with Small Firm.
The Code I used is below. Just paste it into notepad and rename it Click to Fix Amicus.vbs OR you can download it here: https://www.box.net/shared/5ljijk6k4x
Option Explicit
Dim objWMIService, objItem, objService
Dim colListOfServices, strComputer, strService, intSleep
strComputer = "."
intSleep = 15000
'On Error Resume Next
' NB strService is case sensitive.
strService = " 'Amicus PE Service' "
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where Name ="_
& strService & " ")
For Each objService in colListOfServices
objService.StopService()
WSCript.Sleep intSleep
objService.StartService()
Next
WScript.Quit
I used this site to help me create it: http://www.computerperformance.co.uk/vbscript/wmi_services.htm#Example_2_-_Script_to_Stop,_then_Start_a_Windows_Service_
Comments