Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impossible rename file during installation #538

Closed
kain64 opened this issue Nov 26, 2018 · 4 comments
Closed

impossible rename file during installation #538

kain64 opened this issue Nov 26, 2018 · 4 comments

Comments

@kain64
Copy link

kain64 commented Nov 26, 2018

https://stackoverflow.com/questions/14475166/changing-file-name-while-installing
current implementation is:
public File(string sourcePath, params WixEntity[] items)
{
this.Name = sourcePath;

probably need to split name and source path

@kain64
Copy link
Author

kain64 commented Nov 26, 2018

can you please review it and approve or reject.

@Xaddan
Copy link
Contributor

Xaddan commented Nov 27, 2018

You can change the name as follows:

File("A.txt"){AttributesDefinition = "Name=B.txt"}

oleg-shilo added a commit that referenced this issue Nov 27, 2018
….TargetFileName`

- Fixed problem with locating latest (v3.11) WiX Toolset installed
@oleg-shilo
Copy link
Owner

@Xaddan is right. The default use case is the deployment of the file with the same name as the source file.

Everything else needs to be done by specifying custom attributes directly as in the example above.

Though in the very next release you will be able to set it via dedicated property TargetFileName:

new File("A.txt")
{
    TargetFileName = "B.txt"
}

@kain64
Copy link
Author

kain64 commented Nov 27, 2018

@Xaddan, @oleg-shilo thank you very much ) {AttributesDefinition = "Name=B.txt"} is working

oleg-shilo pushed a commit that referenced this issue Dec 1, 2018
- Fixed problem with locating latest (v3.11) WiX Toolset installed
- Issue #538: impossible rename file during installation; added `File.TargetFileName`
- Issue #536: External_UI/WinFormsSetup how to get properties
- Issue #531: Question: custom action and Embedded UI
- Issue #511: Compile error CustomDialog
- Issue #512: Cannot define RemotePayload
- Issue #484: Is ExecuteInTempDomain really necessary?
- Added `BalCondition`
- Added `CAValidation` enum - `InRemoteAppDomain, InCurrentAppDomain, Disabled`
- WixSharp.VS.ProjectTemplate: Release v1.6.0.0
- Updated to the new `WixSharp.UI.Runtime` structure.
- Code cleanup (mainly CodeMaid cleaning)
oleg-shilo pushed a commit that referenced this issue Dec 1, 2018
- Fixed problem with locating latest (v3.11) WiX Toolset installed
- Issue #538: impossible rename file during installation; added `File.TargetFileName`
- Issue #536: External_UI/WinFormsSetup how to get properties
- Issue #531: Question: custom action and Embedded UI
- Issue #511: Compile error CustomDialog
- Issue #512: Cannot define RemotePayload
- Issue #484: Is ExecuteInTempDomain really necessary?
- Added `BalCondition`
- Added `CAValidation` enum - `InRemoteAppDomain, InCurrentAppDomain, Disabled`
- WixSharp.VS.ProjectTemplate: Release v1.6.0.0
- Updated to the new `WixSharp.UI.Runtime` structure.
- Code cleanup (mainly CodeMaid cleaning)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants