Solved

Running a Program as a Windows Service

Posted on 2013-07-01
6
172 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 21

Expert Comment

by:Haresh Nikumbh
Comment Utility
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
Comment Utility
Well,, that did make a small difference, i am now getting the error "fully qualified path to .exe must be given"
0
 
LVL 21

Expert Comment

by:Haresh Nikumbh
Comment Utility
0
The curse of the end user strikes again      

You’ve updated all your end user’s email signatures. Hooray! But guess what? They’re playing around with the HTML, adding stupid taglines and ruining the imagery. Find out how you can save your signatures from end users today.

 

Author Comment

by:Martyt1
Comment Utility
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 21

Expert Comment

by:Haresh Nikumbh
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Learn about cloud computing and its benefits for small business owners.
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

772 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now