Home → Resources → Articles

Script to Start-Stop All Running Ektron Services on Local Workstation

(Ektron CMS,Microsoft Windows,Microsoft IIS,Microsoft ASP.NET) by Jason Skowronek on 09/25/2009

Anyone that develops on Ektron knows just how resource intensive the locally run Windows services can be. After manually stopping and starting all three of them every time I get on or pulled off a project, I decided to write a handy VBScript to start or stop ALL Ektron Windows Services with a single command.

Enjoy.

' Force explicit declaration of all variables.
Option Explicit
On Error Resume Next
dim arg, ArgNum, oArgs
dim WshShell
Set oArgs = WScript.Arguments
Set WshShell = WScript.CreateObject("WScript.Shell")
ArgNum = 0
While ArgNum < oArgs.Count
 arg = LCase(oArgs(ArgNum))
 Select Case arg
  Case "-stop":
   Call ServiceAction ("stop")
  Case "-start":
   Call ServiceAction ("start")
  Case "-help","-?":
   Call DisplayUsage
  Case Else:
   Call DisplayUsage
 End Select 
 
 ArgNum = ArgNum + 1
Wend
Sub DisplayUsage
 WScript.Echo "Usage: EktronServicesManager <-start|-stop>, [-help|-?]" & vbCrLf & _
       "Example 1: EktronServicesManager -start"
 WScript.Quit (1)
End Sub
Sub ServiceAction (action)
 WshShell.Run "net " & action & " ""Ektron Extensibility Server""", 1
 WshShell.Run "net " & action & " ""Ektron Async Processor""", 1
 WshShell.Run "net " & action & " ""Ektron Windows Services 3.0""", 1
End Sub

Comments (0)

Leave a comment
Name *
Email *
Homepage
Comment

SkoNet provides comprehensive digital consulting services such as: web development, applications development, database design and architecture, business process management, customer relationship management, and many others that help businesses of every size, industry, and geography meet the complex challenge of managing and sharing information on the web. Our skills and expertise in online systems allow us to help customers build applications ranging from simple, single-page web sites to robust enterprise systems.

Online Backup, Ektron Consulting, Ektron Programmer, Ektron Developer, Ektron Partner Utah, Ektron Partner, Ektron Architect, Ektron Hosting, Salesforce.com Consultant Utah, Salesforce.com Partner Utah, Salesforce.com Partner, Salesforce.com Programmer, Salesforce.com Architect, Salesforce.com APEX Programmer