Create ServiceInstall in Wix on exe from unknown ahead path

411 views Asked by At

I have a problem that I'd appropriate your assistance with . I'm using wix (with vs 2013) to create installer that does the following : Copy all files from folder A to folder B (both user editable) . If it contains some specific file create a windows service out of it .

I prefer to do it in Wix for easier support of upgrade \ uninstall etc ...

I have a problem with it : I copy all the files using CopyFile element and For the service I need to specify the file name \ source in the File element for which I want to create a service , but I can't specify the Source since it's dynamic (even though I have a property for it).

Thanks !

1

There are 1 answers

0
Christopher Painter On

This isn't supported by Windows Installer. The underlying ServiceInstall table doesn't allow you to specify the filename of the service:

Component_

External key to column one of the Component Table. Note that to install this service using the InstallService table, the KeyPath for this component must be the executable file for the service.

The only way I see you could do what you are trying to do is if you use custom actions to emit temporary rows into the tables at install time. That's a very advanced concept (similar to dynamic code generation).