Solved

Running a Program as a Windows Service

Posted on 2013-07-01
6
200 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Robycopy Copy Data \ Disk to Disk (new\changed data) 19 127
powershell script 9 64
Word 2016 Installation Problem on Terminal Server 9 39
FTP server windows 2008 5 39
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

828 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