Windows service / command line tools question

G

Guest

I've been asked to find out if a project is possible, but I'm not having much
luck finding the information I need, I hope some one can help. I need to see
if I can build a windows service on the fly customized to a specific client.
Is it possible to run the VS command line tool through another application
(VB.NET)? I'm thinking I can run the tools as a process and pass the
necessary parameters to the process, but I'm not sure how to go about this.
If that is possible, how hard would it be to build the setup project for the
service using the command line tools? I've used the command line tools a
little bit to build a regular application, but I guess what I need to know is
there any special commands/parameters needed to build a setup package using
the command line?

Any help would be greatly appreciated.

Chris
 
G

Guest

Hi clsmith66,

What sort of customisation are you looking to do to each service?

What you're looking for may be do-able using Custom Commands sent to the
service.

Adam
 
G

Guest

I need to be able to set variables for items like smtp and mac address for
the individual servers. I know I could build theses into a .config file, but
I've been asked to put them in the complied version. I was thinking of just
building a template service application and then just before build, edit
these values in a specified class and then build the service and installer.

Chris
 
G

Guest

Hi Chris,

Is there a particular reason that you want to compile the variables in? Is
it for security that they can't be changed?

After much thought about your problem, I think this is the best solution:

1. Create a command line vb app that takes your params as command line
options and uses a TextFileReader/Writer to change your .vb file according to
the params.

2. Create a batch file that takes params and calls the tool mentioned above,
passing the params through. It then goes on to call vbc to compile your
service.

As I said, it's a bit fiddly, but it'll do what you need it to do.

HTH,

Adam
 
G

Guest

I will look into creating the batch file and passing the parameters in that
way. To answer your questions, I was asked specifically to hardcode these
variable into the application, you are right, so the technicians who will be
using this service can not change them. Thanks for you help, I think I'm on
the right path now.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top