Hi
So I have 2 folders to deploy. One is in APPDIR and the other is property-based on a property called PROP_SETUPFOLDER. I have the following actions:
- after Wizard Dialog's Searches : set PROP_SETUPFOLDER to [SourceDir] if UILevel > 2
- after Install Execution's Searches : set PROP_SETUPFOLDER to [SourceDir] if UILevel = 2
- after Install Execution's Searches : set [IIsWWWRootFolder]\[PROP_VIRTUALDIRECTORYNAME] if UILevel = 2
In the dialogs, I ask the user for the PROP_VIRTUALDIRECTORYNAME value.
Let's suppose my MSI is in C:\Temp.
if I run the installer normally (with dialogs) and enter the virtualdirectory name of MyApp when asked by the dialog, everything works as expected : the contents of PROP_SETUPFOLDER are copied in C:\Temp and the contents of APPDIR are copied to wwwroot\MyApp.
If I run in quiet mode (command line with /quiet) and set the virtual directory property to MyApp as a command line argument, then it almost works : the contents of APPDIR is copied to wwwroot\MyApp (good!) but the contents of PROP_SETUPFOLDER are copied to a folder called wwwroot\MyApp\PROP_SETUPFOLDER (this is bad, it should go to C:\Temp and not create a new folder called PROP_SETUPFOLDER).
And just to be clear : In Files&Folders, there is PROP_SETUPFOLDER which contains Script1.txt. I expect it to go to C:\Temp\Script1.txt. But in quiet mode, the result is wwwroot\MyApp\PROP_SETUPFOLDER\script1.txt.
It could be a problem with the way I set the value of PROP_SETUPFOLDER in a custom action after Install Execution's Searches. But I suspect there is something else happening. I checked the resulting log file and the SourceDir property seems correctly set to C:\Temp even in Quiet mode, at least at the end of the installation. Note that I have to set the property's value before the Install Execution's CostFinalize step, otherwise I get an error : Could not access network location ".". I tried putting my action right before the CostFinalize step, but I still get my wrong folder bug.