Running a CMD file as a service

  • Thread starter Thread starter Scott Bass
  • Start date Start date
S

Scott Bass

Windows XP Professional
Windows 2000 Server

Do I have to buy additional software in order to install a CMD file to run
as a service? If not, how do a accomplish this?

Thanks...
 
Windows XP Professional
Windows 2000 Server

Do I have to buy additional software in order to install a CMD
file to run
as a service? If not, how do a accomplish this?

Thanks...

What are you wanting to do? Running a CMD file as a service seems like
total obserdity to me.
 
Run a Program as a Service

How To Create a User-Defined Service
http://support.microsoft.com/?scid=kb;en-us;137890

How To Run Automation Manager as a Windows NT Service
http://support.microsoft.com/default.aspx?scid=kb;en-us;193238

INFO: Invokable TP Written as an Application to Run as a Service
http://support.microsoft.com/default.aspx?scid=kb;en-us;151239

Instrsrv.exe installs and removes system services from Windows NT and
Srvany.exe allows any Windows NT application to run as a service.

Srvany.exe: Applications as Services Utility & Instsrv.exe: Service
Installer are included in...
Windows Server 2003 Resource Kit Tools
http://www.microsoft.com/downloads/...69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en



--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
When my machine starts, I want to instantiate a SAS/Share server process.
Also, if the process dies, I want it to restart.

I can accomplish the "start when the machine starts" using Schedule Task,
but running as a service would accomplish the "restart on process failure"
functionality.

It doesn't HAVE to be a command file; it could just be the software
invocation command string. A command file would allow me to do additional
stuff like send an email if the process dies.

Why do you say running a command file as a service would be an absurdity?

P.S.: I've Googled and do see a number of s/w applications that allow one
to create their own services. I suspect they are just GUI's into the
appropriate registry settings. If I have to, I'll buy the s/w, but wanted
to check here first.
 
Hi Wesley,

This is exactly what I need, except the MS KB articles did not state that
the solution applied to WXP. Also, while we're currently using W2K Server,
we may go to W2003 Server in the future.

Is this just a shortcoming in the KB article, and that the solution also
applies to the above operating systems?

Also, I'm a bit worried that
http://support.microsoft.com/default.aspx?scid=kb;en-us;193238 states:

NOTE: The Microsoft Windows NT 4.0 Resource Kit documents Srvany.exe as an
unsupported tool. Use this tool at your own risk.

Any comments on that?

Can you confirm that the Windows NT Resource kit applies to WXP and W2003?
Alternatively, will the W2003 Server resource kit (below link) also work on
WXP and W2K Server?

Thanks,
Scott
 
Scott,

Windows XP is NT 5.1. A lot of MSKB articles apply to XP even though the
APPLIES TO does not list XP. I have no earthly idea why this is. Of course
there are changes with XP but most MSKB articles that apply to Windows 2000
apply to Windows XP. Sometimes you have to use your own judgment on what
applies and what doesn't.

As far as I know the information about SRVANY.EXE and INSTSRV.EXE listed as
applying to Windows NT and 2000 Pro in the MSKB articles applies to XP/2003.

For example, I have and use Exctrlst.exe, pulist.exe and Wntipcfg.exe from
the Windows 2000 Resource Kit on XP Pro. The Support Policy for
Exctrlst.exe and Wntipcfg.exe states...
[[The SOFTWARE supplied in the Resource Kit Tools download site is not
supported under any Microsoft standard support program or service. You can,
however, report issues and bugs by sending e-mail to...]]

I have downloaded (geez, over two years ago) but not installed the Windows
Server 2003 Resource Kit Tools.

Download details: Windows Server 2003 Resource Kit Tools states:
[[System Requirements
Supported Operating Systems: Windows Server 2003; Windows XP]]
http://www.microsoft.com/downloads/...69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

There are some tool updates but SRVANY.EXE and INSTSRV.EXE are not listed.
Windows Server 2003 Resource Kit Tool Updates
http://www.microsoft.com/windowsserver2003/techinfo/reskit/tools/default.mspx

Windows Server 2003 Resource Kit Tools Support states...
[[The software supplied on the Resource Kit and Support Tools download web
site ("Software") is not supported under any Microsoft standard support
program or service. You can, however, report issues and bugs by sending
e-mail to...]]
Windows Server 2003 Resource Kit Tools Support and Localization Policy
http://www.microsoft.com/windowsserver2003/techinfo/reskit/tools/supportpolicy.mspx

Microsoft even says this, for example, about TweakUI...
[[Note: We take great care to ensure that PowerToys work as they should, but
they are not part of Windows and are not supported by Microsoft. For this
reason, Microsoft Technical Support is unable to answer questions about
PowerToys.]]
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

Use SRVANY.EXE and INSTSRV.EXE from Windows Server 2003 Resource Kit Tools.
The older MSKB articles applying to earlier NT and 2000 versions are for
reference because there are no newer articles.

If you do Advanced Searches @
http://support.microsoft.com/default.aspx?scid=FH;EN-US;KBHOWTO
for SRVANY.EXE and INSTSRV.EXE using Search Product: Windows XP you get
diddly for hits. If you do regular Searches for SRVANY.EXE and INSTSRV.EXE
you get all kinds of hits.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top