Hi Phil,
So you cannot set the permissions before as the files are not created and you cannot set them after as the error display when creating the files.
Please note that you need to remove the permission you configured in Advanced Installer (they are the ones which cause the error). After these permissions are removed, the package should install correctly on the network drive (our tests were successful).
Since the folders will be installed without any permissions, you need to use a custom action to set the permissions you want. This custom action can be scheduled under the "InstallExecuteSequence" -> "InstallFinalize" standard action in order to be executed after the installation is finished. Note that you can see a standard action in the
Custom Actions page by using the "Show Standard Action" button on the toolbar.
I tried to create the folders on the network before installing and I just pointed them during the setup and it's still not working so it really seems that the creation of the files is the problem.
The problem is not creating the folders (this is done successfully), it is setting the permissions for them. Therefore, it doesn't matter if the folders are already created when the installation runs because the installation will fails when the permissions are set. Since the files are installed after the permissions are set for the folders, the files will not be created if the installation fails.
It's my first setup to deploy in customers' production sites and I can't due to this issue so it's quite urgent
The solution is the one suggested by Ionut: use FileAcl or Xcacls as a custom action. Here are the steps for using Xcacls:
- add the
XCACLS.vbs file to your installation package
- go to the "Custom Actions" page and create a "New Attached Custom Action" under "InstallExecuteSequence" -> "InstallFinalize"
- in the "Select a file to execute as a custom action" dialog go to the Advanced Installer installation folder and select the "aicustact.dll" file from the "custact" folder
- in the "Custom Action Properties" page set the "Function Name" combo to "CreateExeProcess"
- set the "Action Data" field to:
Code: Select all
"[SystemFolder]cscript.exe" "[#XCACLS.vbs]" "C:\MyFolder" /G MyUser:F
- this is an example, you can adapt the command line to what you need
- set the "Execution Options" section to "Deferred with no impersonation"
- make sure that the "Expression" field is set to "NOT Installed"
This custom action will launch "Cscript.exe" from the "system32" folder in order to run the "XCACLS.vbs" script with the specified parameters. In this example I used our "CreateExeProcess" function to make sure that "Cscript.exe" does not show any command windows.
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging