Windows Installer Solution not installing service

G

Guest

List
I've made a .NET windows service in C++, then I added an installer to the solution. I added the 'Project Output' from my .NET service as a package for the installer to install however it does not install my program as a service on the client machine. Is there something special I need to do? Shouldn't the 'Project Output' show the installer that I have made a service and then install the thing properly?
 
M

Marc Butenko

You neet to use the .NET ServiceInstaller class:
http://msdn.microsoft.com/library/d...mServiceProcessServiceInstallerClassTopic.asp

Also, see the following for adding an installer to a Service:
http://msdn.microsoft.com/library/d...kaddinginstallerstoyourserviceapplication.asp

Hope that helps,
--
Marc Butenko
(e-mail address removed)



D Busby said:
List,
I've made a .NET windows service in C++, then I added an installer to
the solution. I added the 'Project Output' from my .NET service as a
package for the installer to install however it does not install my program
as a service on the client machine. Is there something special I need to
do? Shouldn't the 'Project Output' show the installer that I have made a
service and then install the thing properly?
 
G

Guest

Marc, List
I've added one of those according to the docs (I had read those links already). That is why I posted. Does the installer output a debug file? (I can't find one

Here are steps to reproduce my issue
Open VS.NET and create a blank solutio
Add a New Project -> Visual C++ -> Windows Service (.NET
name it testsv
In the designer view for testsvcWinService.h right click and pick Add Installe
This will create Project Installer.h with (according to docs) should have all necessary properties se

Add a New Project -> Setup and Deployment Projects -> Setup Projec
name this testin
Add -> Project Output -> Primary Output from testsv
Check in configuration manager to ensure that a Build Solution will create testsvc and then testins
Run testins.ms
Notice that your testsvc has not been added to the Services Manager (services.msc
Notice that your testsvc is not listed in the registry as a service (traces from installer tho
Un-install (Add / Remove Programs) testin
You can try different settings an what not for the serviceInstaller or projectInstaller, it still won't work
Your files will get installed into the proper location (Program Files\Default Company Name\testins\testsvc.exe
According to the docs on MSDN this should work and install the service, if you look at the code it matches the samples and should work...it does not
 
M

Marc Butenko

I would check the following:
1.. Click the ServiceInstaller component and verify that the value of the
ServiceName property is set to the same value as the ServiceName property on
the service itself.
2.. Did you make sure to setup the custom action part of the setup
program.
3.. Ensure you have the proper permissions on the machine you are trying
to install it

--
Marc Butenko
(e-mail address removed)


D Busby said:
Marc, List;
I've added one of those according to the docs (I had read those links
already). That is why I posted. Does the installer output a debug file? (I
can't find one)
Here are steps to reproduce my issue:
Open VS.NET and create a blank solution
Add a New Project -> Visual C++ -> Windows Service (.NET)
name it testsvc
In the designer view for testsvcWinService.h right click and pick Add Installer
This will create Project Installer.h with (according to docs) should
have all necessary properties set
Add a New Project -> Setup and Deployment Projects -> Setup Project
name this testins
Add -> Project Output -> Primary Output from testsvc
Check in configuration manager to ensure that a Build Solution will
create testsvc and then testins.
Run testins.msi
Notice that your testsvc has not been added to the Services Manager (services.msc)
Notice that your testsvc is not listed in the registry as a service (traces from installer tho)
Un-install (Add / Remove Programs) testins
You can try different settings an what not for the serviceInstaller or
projectInstaller, it still won't work.
Your files will get installed into the proper location (Program
Files\Default Company Name\testins\testsvc.exe)
According to the docs on MSDN this should work and install the service,
if you look at the code it matches the samples and should work...it does
not.
 
G

Guest

Forgot to mention
Yes the names are the same (in the steps I sent you can see this
I was not using the installer correctly, I did not have the Custom Action working properl
I do have permissions
After getting the Custom Action working correctly the install still fails stating the the file created (testsvc.exe) is not of the correct type, "Unverifiable image 'testsvc.exe' can not be run.."
If my Custom Action has a InstallerImage = false I get a command prompt window that hangs then gives a similar messag
If my Custom Action has InstallerImage = true I get a hang during the install, then this message. Now why would my Service Image be unverifiable?
 

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