473,480 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to specify application parameters to .NET service installer

I have a Console app, a related Service Project and Service Setup /
Installer Project. I would like to have the result of running the
installer.msi file register the service to run with certain
parameters.

How do i specify parameters that the application needs to start up /
run with?
is it in the properties of the ServiceProcessInstaller or
ServiceInstaller objects?
is it in the properties of the Service Setup project?

Background info:
1) I've noticed Windows Services specify parameters after the
executable in the "Path to executable" so getting the installer to put
application parameters to this config setting would probably work
also?
2) the app runs with syntax: "MyApp.exe /f MyApp_ConfigFile.txt"

i hope i've provided enough information to be clear.

thanks, dave

Oct 23 '07 #1
1 2438

The only way we could find to do it is to modify the registry after
the service is installed (which of course makes the built-in installer
stuff pointless since all it really does for services is make the
registry entry).

Our services run in either console mode or service mode (helpful for
debugging) and we use a command line switch to determine which to use.

If you find a better way I'd love to hear it...

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On Tue, 23 Oct 2007 14:57:14 -0700, Dave <dj*********@gmail.com>
wrote:
>I have a Console app, a related Service Project and Service Setup /
Installer Project. I would like to have the result of running the
installer.msi file register the service to run with certain
parameters.

How do i specify parameters that the application needs to start up /
run with?
is it in the properties of the ServiceProcessInstaller or
ServiceInstaller objects?
is it in the properties of the Service Setup project?

Background info:
1) I've noticed Windows Services specify parameters after the
executable in the "Path to executable" so getting the installer to put
application parameters to this config setting would probably work
also?
2) the app runs with syntax: "MyApp.exe /f MyApp_ConfigFile.txt"

i hope i've provided enough information to be clear.

thanks, dave
Oct 25 '07 #2

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

Similar topics

5
14441
by: krisk | last post by:
Could not find ansewr: in ProjectInstaller, RunInstallerAttribute: ..... this.serviceInstaller1.ServiceName = MyServiceName; in the code: public class MyService :...
7
3656
by: sidd | last post by:
Hi All, i have some doubts on .net windows services.. please see if some one could help me understand this.. 1)is it possible to install a windows service which does not have a installer added...
1
2719
by: md | last post by:
I recently installed Windows XP SP2 (Had no problems with it at all FWIW). One of the applications I am writing has a server piece that communicates on a TCP/IP port that is blocked by default in...
6
9033
by: tuuky | last post by:
I've created a Windows Service in C# and an installer project for it. I installed the service using the packaged installer project and the service was installed correctly and it runs fine. ...
6
2006
by: Paul | last post by:
Hello everyone: I am developing a VB.Net Windows Application and I am now ready to create the deployment project for it. This application needs to be installable on a different number of users...
4
7048
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a...
0
3962
by: mjurban | last post by:
I am trying to find a way to specify the "Start Parameters" for a windows service upon installation, instead of before startup. There is an Account property in the ServiceProcessInstaller class...
0
1259
by: Dave | last post by:
I have a Console app, a related Service Project and Service Setup / Installer Project. I would like to have the result of running the installer.msi file register the service to run with certain...
0
1097
by: Nick | last post by:
I have multiple projects in a solution in VS 2003. I am using VB.net, and I have an installer file that build and installs an application with executable output. I also have a project and...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7076
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6732
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6886
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.