Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

How to specify application parameters to .NET service installer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 23 Oct 2007 22:57 GMT
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
Samuel R. Neff - 25 Oct 2007 20:34 GMT
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.

>I have a Console app, a related Service Project and Service Setup /
>Installer Project.  I would like to have the result of running the
[quoted text clipped - 17 lines]
>
>thanks, dave

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.