Solved

Running a Program as a Windows Service

Posted on 2013-07-01
6
217 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

734 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