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# / March 2008

Tip: Looking for answers? Try searching our database.

I need to install a COMPILED windows service .exe

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rogelio - 25 Mar 2008 17:24 GMT
here's my problem: I have an obfuscated, compiled .exe , that is a windows
service, and I need it to install using a setup project. since its already
compiled, I can't just go to "custom actions" and add primary output from the
service. my setup project doesnt see it. so how the heck do I do it?

I was thinking of using a DOS .bat file that uses sc.exe or installutil.exe,
but I am still having trouble making it work. anyone got a tutorial or
something. that would be awwesome. thanks.
sloan - 25 Mar 2008 18:44 GMT
Go here:

http://www.eggheadcafe.com/articles/20041204.asp

1) I made the ServiceManager a "self-installing" service a- la Craig
Andera's excellent example code. You only need to run "ServiceManager.exe
/install" or "ServiceManager.exe /uninstall" and you are good to go. This is
relatively easy to do, and it eliminates the need to rely on that nasty
InstallUtil.exe thing.

Which is aka for
MyWindowsService.exe /install
MyWindowsService.exe /uninstall

Ignore the msmq stuff, and focus on #1.

I found that by accident, and that is my goto windows service installer
method now.

Shout out to Peter (again) for that one.

..

> here's my problem: I have an obfuscated, compiled .exe , that is a windows
> service, and I need it to install using a setup project. since its already
[quoted text clipped - 6 lines]
> but I am still having trouble making it work. anyone got a tutorial or
> something. that would be awwesome. thanks.
Rogelio - 25 Mar 2008 19:12 GMT
maybe I'm missing somethere here..
my setup project has 2 files. a windows app .exe, and a win service.exe. no
projects.

that's it. I dont have any additional projects or anything.  so how would I
make it install the service and remove the service on install.

> Go here:
>
[quoted text clipped - 29 lines]
> > but I am still having trouble making it work. anyone got a tutorial or
> > something. that would be awwesome. thanks.
Peter Bromberg [C# MVP] - 25 Mar 2008 19:40 GMT
That's difficult, because the whole idea of a setup project is to take
unbuilt solution projects and build them into the MSI installer. When you try
to make a setup project using only prebuilt executables, you will find it
difficult at best. I'm sure it can be done, but that isn't what your basic
setup project was designed for (as you have already found out).
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net

> maybe I'm missing somethere here..
> my setup project has 2 files. a windows app .exe, and a win service.exe. no
[quoted text clipped - 36 lines]
> > > but I am still having trouble making it work. anyone got a tutorial or
> > > something. that would be awwesome. thanks.
JamesB - 27 Mar 2008 18:01 GMT
> maybe I'm missing somethere here..
> my setup project has 2 files. a windows app .exe, and a win service.exe.
[quoted text clipped - 4 lines]
> I
> make it install the service and remove the service on install.

I'm in the midst of service-ifying my application at the moment - rather
than installing the service at setup-time, I am letting my management forms
app do so (the first time you run it, it looks for the service, and if it's
not found, it asks if you'd like to install it).

I found a nice class to take care of all this but I seem to have lost the
link, but if it's of use, I can post some code...

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.