Create a folder by Property - Advanced Installer Community
Ruben
Posts: 57
Joined: Fri Apr 10, 2015 2:35 pm

Create a folder by Property

We need to simply create a folder on the target machine, if not exists.
There's a Property available with the absolute path.
The Folder must be created before a VBScript Custom Action runs, which may copy a file there.

Looks simple, RTFM, but ... sorry, I failed to find it.

(My first attempt was a Property based folder, with the box "Component/Create folder on target machine" checked. But that means something different; the folder is not created.)

Thank you--
Ruben
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Create a folder by Property

Hi Ruben,

I tested the scenario and it worked as expected to me. With the "Create folder on target machine" option checked, the property-based folder was created on the machine as expected even if it contained no file.

Can you please send me the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so I can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ruben
Posts: 57
Joined: Fri Apr 10, 2015 2:35 pm

Re: Create a folder by Property

SOLVED
The "Create folder on target machine" checkbox is the right way. The problem was the execution time of the VBScript Custom Action.

The VBS Script mentioned before was executed too early; at this time the folders were not created indeed.(And the installation stopped, so that the folders were never made.)

Solution: Set the "deferred" with "no impersonation" options for the VBS custom action.
Now, the script runs after folder creation.

Remark: Deferred execution leads to a follow-up problem, because the VBS script cannot access properties now. This is described and solved, for example, here:
http://www.advancedinstaller.com/forums ... hp?t=20318
or here: http://www.advancedinstaller.com/user-g ... -file.html

Eusebiu, Thank you very much.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Create a folder by Property

You're welcome Ruben. I'm glad you solved the problem.

Thank you for sharing the solution with us, I'm sure it will help other users with a similar scenario in the future.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”