user2745219
user2745219

Reputation: 11

How to append Application folder name along with the user chosen Target path during Installation using WIX.?

I want to create/append the Application folder name at the end of the Target path, when the user choose different installation folder path rather than the default path.

The default path is " C:\ProgramFiles\Application Name\"

I wish to append the Folder name as follows "D:\Temp\Application Name\" , if the user choose another path for example "D:\Temp\"

I've referred the Wix UI as "WixUI_InstallDir"

I've also Set the Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER".

By changing the value of the Property "_BrowseProperty" to "[WIXUI_INSTALLDIR]\Application Name" in the BrowseDlg.wxs, I'm getting the error:2872

Any Help...???

Thanks in Advance...

Upvotes: 1

Views: 614

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55581

The simplest approach would be to author every single component in a subdirectory of INSTALLLOCATION. That way a component would be [INSTALLLOCATION]Application Name.

Another approach would be to use a custom action to see if they selected a path that ended with the application name and if they didn't add it. Too complicated IMO.

I don't know that I really agree with this requirement though. It's not a convention that is widely used and may frustrate a user who choses C:\Applications\Application Name and ends up getting C:\Applications\Application Name\Application Name. I'd be annoyed and choose C:\Applications to get C:\Applications\Application Name.

The widely accepted standard is to make INSTALLLOCATION = [ProgramFilesFolder]My Company\My Application.

Upvotes: 1

Related Questions