473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

c# windows service, how to install on different machine?

so i can use installutil to install the service on the machine the service
was written on, but how can i take the EXE and install on another computer
that doesnt have installutil?

am i limited to the ms command line utilities that normally install exe's as
services?

Jul 12 '07 #1
5 6206
Every setup tool I've ever seen has a way to install a service, and that
includes VS 2005 setup&deployment projects, so I'd start there.
--
Phil Wilson
[MVP Windows Installer]

"S Moran" <s@moran.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
so i can use installutil to install the service on the machine the service
was written on, but how can i take the EXE and install on another computer
that doesnt have installutil?

am i limited to the ms command line utilities that normally install exe's
as services?

Jul 12 '07 #2
You could give your exe a "-install" command line argument.

.... at which point, it would go out and register itself as a service. No
trouble.

The Service class has everything you need to install / uninstall a service.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"S Moran" <s@moran.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
so i can use installutil to install the service on the machine the service
was written on, but how can i take the EXE and install on another computer
that doesnt have installutil?

am i limited to the ms command line utilities that normally install exe's
as services?

Jul 12 '07 #3
could you elaborate? what code do i have to add and can you give a small
example?

"Chris Mullins [MVP]" <cm******@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
You could give your exe a "-install" command line argument.

... at which point, it would go out and register itself as a service. No
trouble.

The Service class has everything you need to install / uninstall a
service.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"S Moran" <s@moran.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>so i can use installutil to install the service on the machine the
service was written on, but how can i take the EXE and install on another
computer that doesnt have installutil?

am i limited to the ms command line utilities that normally install exe's
as services?

Jul 13 '07 #4
There are tons of articles on the web how to do this:
http://www.c-sharpcorner.com/UploadF...eInCSharp.aspx

All you need to do really is poke at 2 or 3 registry keys.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"S Moran" <s@moran.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
could you elaborate? what code do i have to add and can you give a small
example?

"Chris Mullins [MVP]" <cm******@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>You could give your exe a "-install" command line argument.

... at which point, it would go out and register itself as a service. No
trouble.

The Service class has everything you need to install / uninstall a
service.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

"S Moran" <s@moran.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>>so i can use installutil to install the service on the machine the
service was written on, but how can i take the EXE and install on
another computer that doesnt have installutil?

am i limited to the ms command line utilities that normally install
exe's as services?


Jul 13 '07 #5
On Jul 12, 1:09 pm, "S Moran" <s...@moran.comwrote:
so i can use installutil to install the service on the machine the service
was written on, but how can i take the EXE and install on another computer
that doesnt have installutil?

am i limited to the ms command line utilities that normally install exe's as
services?
If the target machine has the .Net framework properly installed, then
InstallUtil will be present there.

Chris

Jul 17 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
2
by: cd | last post by:
Is there a specific process or permissions that must be granted to get a .NET (framework 1.4) Window Service to run properly on a Windows 2003 Server? I built a Windows Service to start two local...
7
by: Larry Bird | last post by:
I have a windows service that want to un-install. When I run "installutil /u serivcename" I get the error that the serivce is not installed on my machine. However, when view the serivce console I...
6
by: BK | last post by:
I've created a windows service and tested it. It works the way I want it to. I added a ProjectInstaller and set the appropriate properties in my Windows Service project. To install it, I went to...
0
by: =?Utf-8?B?U2ltb25EZXY=?= | last post by:
Hi All I would like to install the same Windows Service project on the same server under different names, one for each customer. I have been able to do it but I would like an expert opinion as...
4
by: ravitunk | last post by:
hello all..i have a windows service which inserts a record into a table after every 24hours....while creating this windows service i selected 'Localsystem' as the account type in the properties...
1
by: kirk.quinbar | last post by:
Have you ever used a .net deployment project to install a windows service? If so, then i ran into an issue recently that maybe you could shed some light on. I am sure I probably did something...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.