Solved

Running a Program as a Windows Service

Posted on 2013-07-01
6
192 Views
Last Modified: 2014-02-27
I have an issue which i am trying to understand how to get this to work. I have a piece of software which requires a specific user to be logged in to run. I am trying to use the windows  "srvany.exe" which allows the program to run as a windows servicebut im not having any luck .. I am following theinstructions on this site, http://support.microsoft.com/kb/137890, and in doing so i recieve the error  'C:\Program' is not  recognized as an intertnal or external command.. Something tells me i am missing something really simple but im at my wits end. Any recommendations or suggestions would be greatly appreciated..
0
Comment
Question by:Martyt1
  • 3
  • 2
6 Comments
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39290219
C:\Program Files\Resource Kit\Srvany.exe

you need to use double quote as there is space in betn program and files

try below

C:\"Program Files\Resource Kit\Srvany.exe"
0
 

Author Comment

by:Martyt1
ID: 39290302
Well,, that did make a small difference, i am now getting the error "fully qualified path to .exe must be given"
0
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39290343
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Martyt1
ID: 39290378
i have made progress, i now have the service installed and i am now trying to figure out what i am supposed to be doing in the registry, these instructions on this site "http://support.microsoft.com/kb/137890" are worthless..
0
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 39290484
After installing service it should create appropriate registry value.. have you verified if any keys are created in registry ?
0
 
LVL 15

Accepted Solution

by:
ZabagaR earned 500 total points
ID: 39290560
I use srvany.exe a lot. I'm very familiar with it. I'll attach a jpg to this post. There are 2 steps:

1.  Use "srvinstw.exe" to make a new windows service (or other tool if you'd prefer). This is a typical next -> next -> finish wizard. Enter the name of your service, the credentials you want it running under, etc. For the service itself you point it to the drive & path of where your "srvany.exe" executable is stored. You can find this "srvinstw.exe" MS tool in a few places such as http://files.medinform.su/

2. Open up regedit and find your service. Look at my screenshot. I added a srvany service called "rms". The ONLY thing you need to do in regedit is to add the new reg key called "Parameters" then inside that new key, add the value Application. Application will point to the actual program you intend to launch as a service.

Also be sure that whatever account you use has "log on as a service" rights on the machine,
srvany-service.JPG
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question