Is there a way in my exe program i can register a dll as a service ?
If so please try and give code samples
Printable View
Is there a way in my exe program i can register a dll as a service ?
If so please try and give code samples
Carl,
The answer to this question can fill a couple of books, and while I hate to answer a question with a question, I need to know, did you build your DLL as a windows service?
If not, then nothing you can do will help you with that you will have to rebuild your project as a windows service first. That's where the books come in, I've written a couple of windows services, but I wrote them in C# so the code would be of no value here.
Aren't services executeables, not DLLs?
I stand corrected on the DLL/EXE argument :wave:, but the rest of the post still stands, you must create your project as a windows service to register it as one under windows.
no i havnt started building it as yet i like to make sure all the corners are covers before starting someting hence why i ask now..
As for the writing of the service yes it will be wrote under windows service but i have another application(exe) that i want to register the service, hence the title of this post
You use the InstallUtil to register the service. I don't see why your other app couldn't just call a command line of it through Shell.
YEAH command line you can also hide that process cant you ?
Hehe, ok, this sounds like we are trying to help you do something sinister....;)
:wave:
Yeah well its actully for protecting the software on a certain drive... :O)
thanks for the help
Hey, I have a similar question. I want to write a GUI-less .exe in VB and have it run as a service, but I don't know what manner of executable to begin with. Is it standard exe, or Active x .exe? Thanks for any assistance.
Are you talking about VB6?
If so, you cannot directly do this in vb, but there is a wrapper out there somewhere that will help you accomplish this. I no longer have the link for the library and I'll warn you ahead of time, it wasn't very stable when I used it, but that was probably 5 years ago..
OK thanks, that saves quite a bit of time and effort. I'll create it as a regular executable rather than as a service.
to create a service in vb.net just select "Windows Service" from the create new project dialog
Thanks. 1st I'd need to install .net on this station. I'm not sure I'm going to bother for a little DB backup utility. I'll just create an exe and use windows scheduler to run it once a week.