Announcement

Collapse
No announcement yet.

Using a modified property as a file copy destination

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using a modified property as a file copy destination

    Hi there,

    So I have a dialog in my installer that allows the selection of a folder, later on; during installation, I would like to copy files to a sub folder of this chosen folder. I'm trying to get this to work in a very simple project that does not include a dialog to start with, this is what I have,

    a property named TESTFOLDER with a value of "c:\temp"

    a custom action of type 'Set Property' that changes the value of TESTFOLDER to '[TESTFOLDER]Foo\Bar\'. This is scheduled to execute Immediate, Before InstallValidate.

    I also have a file operation that is set to copy a file being installed "test.txt" to destination 'Property' TESTFOLDER.

    This all builds fine and the installer runs, but when I look at the log I see the following,

    ---

    MSI (s) (D8:8C) [09:25:00:255]: PROPERTY CHANGE: Modifying TESTFOLDER property. Its current value is 'C:\temp\'. Its new value: 'C:\temp\Foo\Bar\'.
    Action ended 09:25:00: CUSTOMACTION. Return value 1.
    MSI (s) (D8:8C) [09:25:00:255]: Doing action: InstallValidate
    Action 09:25:00: InstallValidate. Validating install
    Action start 09:25:00: InstallValidate.
    MSI (s) (D8:8C) [09:25:00:260]: PROPERTY CHANGE: Deleting MsiRestartManagerSessionKey property. Its current value is '0f6ccb6c479a934ca7253f7ab26eb101'.
    MSI (s) (D8:8C) [09:25:00:260]: Feature: Complete; Installed: Absent; Request: Local; Action: Local
    MSI (s) (D8:8C) [09:25:00:260]: Component: test.txt; Installed: Absent; Request: Local; Action: Local
    MSI (s) (D8:8C) [09:25:00:260]: Component: Copy_0001; Installed: Absent; Request: Local; Action: Local

    ---

    So I can see the property is changed, but the file is copied to 'c:\temp\', not 'c:\temp\foo\bar', any ideas what I'm doing wrong?

    I've attached a sample MSI Factory project.

    Attached Files

  • #2
    I have it working, but with a dialog step for changing the root path, I've attached the project for anyone else needing to do this.
    Attached Files

    Comment

    Working...
    X