简体   繁体   中英

Create ServiceInstall in Wix on exe from unknown ahead path

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 !

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM