Solved

How do I install an .exe as a service into Windows 2008 Server?

Posted on 2010-09-09
9
438 Views
Last Modified: 2012-05-10
This will probably be simple but I just can't figure it out! How do I install an .exe as a service?
Thanks!
0
Comment
Question by:Bianca
9 Comments
 
LVL 16

Expert Comment

by:uescomp
ID: 33638711
you want the exe to start on startup?
0
 
LVL 2

Expert Comment

by:Hossy
ID: 33638738
Generically, you can use instsrv.exe.  Make sure you run the Command Prompt as an Administrator.

Syntax:
Installs and removes system services from NT

INSTSRV <service name> (<exe location> | REMOVE)
  [-a <Account Name>] [-p <Account Password>]

  Install service example:

    INSTSRV MyService C:\MyDir\DiskService.Exe
    -OR-
    INSTSRV MyService C:\mailsrv\mailsrv.exe -a MYDOMAIN\joebob -p foo

  Remove service example:

    INSTSRV MyService REMOVE
0
 
LVL 2

Expert Comment

by:Hossy
ID: 33638748
If you could provide more information on the EXE you're trying to do, that might help my answer better.  Is the EXE a .NET application, already a service, or just some random command-line exe?  What is the reason you want it to run as a service?  What does the EXE do?
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.

 
LVL 6

Expert Comment

by:FactorB
ID: 33640381
Or simply hide the main window and instead of program you will have process. Plus you can not do this on form show, you will need a timer that can trigger, for example, after 50 ms. Then insert OnTimer event Form1.Hide; ... well there are more elegant ways to do this, but for this one you don't need administrative privileges.

Regards,
B.
0
 

Author Comment

by:Bianca
ID: 33641626
Oops... I am on Windows 2003 server and the INSTSRV command is not recognized... any other options?
0
 
LVL 2

Expert Comment

by:Hossy
ID: 33642635
On 2003, you have a lot more options...

SC CREATE
INSTSRV (available from the Resource Kit Tools - download here: http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en)

There are multiple third-party programs that install themselves and can wrap around anything -- EXE, VBS, BAT, CMD

Again, can you provide more information about the EXE?

If you could provide more information on the EXE you're trying to do, that might help my answer better.  Is the EXE a .NET application, already a service, or just some random command-line exe?  What is the reason you want it to run as a service?  What does the EXE do?
0
 
LVL 2

Expert Comment

by:Hossy
ID: 33642642
SC CRETAE Syntax:

DESCRIPTION:
        Creates a service entry in the registry and Service Database.
USAGE:
        sc <server> create [service name] [binPath= ] <option1> <option2>...

OPTIONS:
NOTE: The option name includes the equal sign.
      A space is required between the equal sign and the value.
 type= <own|share|interact|kernel|filesys|rec>
       (default = own)
 start= <boot|system|auto|demand|disabled|delayed-auto>
       (default = demand)
 error= <normal|severe|critical|ignore>
       (default = normal)
 binPath= <BinaryPathName>
 group= <LoadOrderGroup>
 tag= <yes|no>
 depend= <Dependencies(separated by / (forward slash))>
 obj= <AccountName|ObjectName>
       (default = LocalSystem)
 DisplayName= <display name>
 password= <password>
0
 
LVL 2

Accepted Solution

by:
Hossy earned 500 total points
ID: 33642645
"How to create a Windows service by using Sc.exe" - http://support.microsoft.com/kb/251192
0
 
LVL 2

Expert Comment

by:Hossy
ID: 33642665
Out of all the third-party tools I've used, I recommend FireDaemon over them all (it isn't free, but fairly cheap -- $49).  http://www.firedaemon.com/
0

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Big Problem with Redirected Folder 8 44
Server 2012 R2 TLS 1.2? 2 41
Admin account lockout 10 40
powershell script 9 26
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
A safe way to clean winsxs folder from your windows server 2008 R2 editions
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 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…

803 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