?
Solved

.NET Windows Service/external parameter file

Posted on 2004-04-28
5
Medium Priority
?
288 Views
Last Modified: 2008-03-17
I've got a windows service that installs fine using installutil.exe, but in the deployment I want to include a text file that's going to store a number of parameters that will change on each install.

Maybe a text file isn't the best way of doing this, so am open to other ideas, but if it is, how do I get it to be installed as part of the deployment so that I can reference it as "parameters.txt" rather than "c:\...\...\parameters.txt"?

Thanks
Ben
0
Comment
Question by:bjohns33
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10940356
well it would have to be in the current working directory of your webservice

http://www.codeproject.com/Purgatory/FilesandDirectories.asp explains how to get and set this value using System.IO.Directory
0
 
LVL 1

Author Comment

by:bjohns33
ID: 10941006
Sorry Gregory - yes it would have to be there, but the question is how do I get it there as part of the projectinstaller/installutil installer.

Thanks
Ben
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 2000 total points
ID: 10941088
http://www.devarticles.com/c/a/C-Sharp/Creating-a-.NET-Windows-Installer--Part-1/6/ this covers it ... and is overall a good tutorial on the installer

http://www.devarticles.com/c/a/C-Sharp/Creating-a-.NET-Windows-Installer--Part-1/7/ 
"Support files" is exactly what you are looking for
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11002205
Did this work ?
0
 
LVL 1

Author Comment

by:bjohns33
ID: 11003399
Hi Gregory

Sorry for the tardy response.

I've ended up going the registry route, but thanks for the pointers, very useful couple of articles.

Cheers
Ben
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

801 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