开发者

Modify Installation Path for .NET Service Installer

I have two projects: a Service project and a Service Installer project. The Service project has assembly info that is appropriate for my product. It includes the company information and the proper service name. All of this appears to be ignored once the service is actually installed. When the service is installed, it uses the properties set in the Service Installer's initializeComponent method. It took me a while, but I did manage to discover that.

Unfortunately, the MSI created is still created with company name of "Microsoft", a name of "Service" and thus, the installer defaults to installing to "C:开发者_运维技巧\Program Files (x86)\Microsoft\Service", which doesn't seem like a good default location.

The service project doesn't seem to have any configuration files that I can modify that would affect the default installation path, or the assembly information for the generated setup.exe and the ServiceInstaller.msi.

And, as with most .NET things, Googling has resulted in very little usable information. Any thoughts or suggestions are greatly appreciated!

tl;dr: How do I affect the assembly information and default installation path of a Service Installer project.


It would appear that right-clicking on the Project and choosing "Properties" is different than selecting the Project and opening the Properties pane. From there, one can adjust various properties that are copied to the MSI output. Thanks for looking anyway.


What VS version? Regardless of the version, though, what I would do is recreate the service and add the service installer and move your code over to the newly-created one. This is relatively easy to do on a Windows Service project.

Follow the directions of somethign like this to make sure you are going through the right steps.

You could also just follow those steps without moving your code over and then you can make sure the sample install correctly before moving your code over.

I have never seen the problem you mention, so I think maybe some auto-generated source code file got corrupted along the way. It's usually easier to re-generate it than to fix it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜