Create property-based folder - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Create property-based folder

Hello. In order to store downloads my application needs a special folder on target machine, I'd like to create it during installation. When updating to a new version I'd like the previous path (stored in the registry value) was used by default. I was following this guide: http://www.advancedinstaller.com/user-g ... lders.html, so I created a property DOWNLOADS_FOLDER on the "Install Parameters" page and set its value to the default location that is [PersonalFolder]\[ProductName]\downloads. Then I created a registry search GET_PREV_DOWNLOADS_FOLDER and created a custom action "Property set with Formatted" under "Searches" with property DOWNLOADS_FOLDER and the value [GET_PREV_DOWNLOADS_FOLDER] conditioned also with GET_PREV_DOWNLOADS_FOLDER (so it would not try to use an empty value if the registry parameter doesn't exist). When I try to run an installer it fails with error "Could not access network location C:\users\...". What am I doing wrong?

I also noticed something different in Advanced Installer 9.0.1. Previously when I used AI 8 there was possible to create a custom action and shift drag it to another sequence. Now when I try to do this it simply moves it and resets the schedule parameters. Is that normal?
No milk today
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Create property-based folder

It seems I've managed to solve this by adding yet another custom action before "Searches" that points DOWNLOADS_FOLDER to the default location, i.e. [PersonalFolder]\[ProductName]\downloads. But it's unclear to me why should I create this custom action if I already have the same default value specified on the "Install Parameters" page? And as I said before seems like it's not possible to share a custom action, so I have to create two similar custom actions in both sequences.
No milk today
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Create property-based folder

Hi,

Please note that property values in Install Parameters page cannot use other properties. This is why a "Property set with formatted" custom action is required to set your custom property to the formatted path.

Regarding the custom action share, we are unable to reproduce this behavior. Does it happen with any custom action? Does it happen in a new project?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Create property-based folder

Ok, if I understand you right [PersonalFolder]\[ProductName]\downloads is not the right value for the property defined on the "Install Parameters" page. What should I use instead?
Regarding the custom action share, we are unable to reproduce this behavior. Does it happen with any custom action? Does it happen in a new project?
Yes, it happens with custom actions in the new project created with advanced installer 9.0.1 build 43678. I've tried to create a "Property set with Formatted" custom action under "Searches" action group (or whatever else), set execute only once if present in both sequences option, then holding shift key I moved it to another sequence and instead of being shared it was simply moved and schedule parameter was reset to execute always.
No milk today
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Create property-based folder

Ok, if I understand you right [PersonalFolder]\[ProductName]\downloads is not the right value for the property defined on the "Install Parameters" page. What should I use instead?
As Cosmin mentioned, you cannot add formatted references to properties in the Install Parameters page:
New Bitmap Image.jpg
New Bitmap Image.jpg (3.02 KiB) Viewed 14348 times
The Value field is pseudo-formatted.

Unfortunately we're unable to replicate the behavior you mentioned with version 9.0.1.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Create property-based folder

It seems I've found the way to reproduce the custom actions sharing bug in AI 9.2. If you start dragging the action and then hold shift key, it works. But if you hold shift and then start dragging (I am used to do such things that way), then it doesn't.
No milk today
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Create property-based folder

Hello,

Holding Shift first then start dragging is the intended operation to share a custom action. I just tested sharing custom actions in 9.2 release and everything works as expected.

What bug are you referring to? Can you send your project to our e-mail address so we can see what you mean?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Create property-based folder

Just tested it on other systems: another computer and another OS on the virtual machine on the same computer where bug occurs. Both worked, only with the other computer I noticed it didn't work when I try to do this via teamviewer (remote control app), also remote users can't do this on my machine. I don't have any problems with my keyboard or mouse. What could be the cause for the issue?
No milk today
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Create property-based folder

Hello,

We just tested the functionality using team viewer and everything works as expected. Both operations(hold shift before or after drag&drop) can share the custom action.
We were using Advanced Installer 9.2 and the latest team viewer version on Windows Vista controlling a remote Windows 7.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mentalmushroom
Posts: 63
Joined: Wed Feb 08, 2012 8:08 am

Re: Create property-based folder

No, I didn't mean teamviewer causes the issue. I mean other people can't do this on my machine when they use teamviewer and I can't do this on their machine when I use teamviewer (however, it works on that another machine without teamviewer). So there must be something about my system or software, but I have no idea what could it be.
No milk today

Return to “Common Problems”