I'm currently working on a project requiring multiple steps to deploy correctly. Being the efficient (aka lazy) developer that I am, I decided to automate some of the process. One step calls for stopping a COM+ application. I'm assuming there's a command line utility to handle this, but I've not yet found it. I tried consulting a friendly
guru, but that didn't help. So, I was forced to write the VBScript below.
To use, create a new file, StopComApp.vbs, and add the following:
dim objCatalog
set objCatalog = CreateObject("COMAdmin.COMAdminCatalog")
set args = WScript.Arguments
serviceName = args.Item(0)
objCatalog.ShutDownApplication serviceName
To use, run the following from the command prompt (or batch file):
wscript StopComApp.vbs <AppName>
Can a guru without an answer still be considered a guru? O well, at least I'm friendly.
ReplyDeleteWAIT! Afterthought... you mean you didn't use Powershell??!?!
ReplyDeleteI was wondering if you were going to catch that. The technical reason is I didn't want to install anything on the server. The real reason is I was too lazy.
ReplyDelete