469,928 Members | 1,900 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,928 developers. It's quick & easy.

Windows Installer Solution not installing service

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?
Nov 22 '05 #1
8 5293
You neet to use the .NET ServiceInstaller class:
http://msdn.microsoft.com/library/de...ClassTopic.asp

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

Hope that helps,
--
Marc Butenko
mb******@bresnan.net

"D Busby" <ms**@edoceo.com> wrote in message
news:3D**********************************@microsof t.com...
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?
Nov 22 '05 #2
You neet to use the .NET ServiceInstaller class:
http://msdn.microsoft.com/library/de...ClassTopic.asp

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

Hope that helps,
--
Marc Butenko
mb******@bresnan.net

"D Busby" <ms**@edoceo.com> wrote in message
news:3D**********************************@microsof t.com...
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?
Nov 22 '05 #3
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
Nov 22 '05 #4
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
Nov 22 '05 #5
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
mb******@bresnan.net
"D Busby" <ms**@edoceo.com> wrote in message
news:FC**********************************@microsof t.com...
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.

Nov 22 '05 #6
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
mb******@bresnan.net
"D Busby" <ms**@edoceo.com> wrote in message
news:FC**********************************@microsof t.com...
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.

Nov 22 '05 #7
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?
Nov 22 '05 #8
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?
Nov 22 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mark | last post: by
3 posts views Thread by Jeremy S. | last post: by
4 posts views Thread by bob lambert | last post: by
reply views Thread by =?Utf-8?B?U2ltb25EZXY=?= | last post: by
5 posts views Thread by dm3281 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.