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!

MSI_Exec
Posts: 3
Joined: Wed Mar 11, 2015 5:54 pm

create property based folder only when property is populated

Hi guys,

I'm currently building an installer that needs to support multiple versions of Photoshop to drop a file into the scripts directory. At present I'm using multiple registry searches to determine which versions of PS are installed on the box (some people have more than one :( )

everything is working fine with the only issue being if the installer does not find the reg key then it will create a folder in the root of c: with a name that matches the search property.

Does anyone else have a similar issue and how are you handling it? Is there a way to tell the installer to only create the folder if the search returns a value, or do i need some kind of custom action to clear up the bad folders after install?

Thanks in advance.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: create property based folder only when property is popul

Hi and welcome to Advanced Installer forums.

In order to set a condition for that folder, you can right-click on it, use the "Go to component" option, then set the appropriate condition for its related component from the "Organization" page (i.e. NOT FOLDER_PROP).

If that folders contains more files, then you need to set conditions for all those files.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MSI_Exec
Posts: 3
Joined: Wed Mar 11, 2015 5:54 pm

Re: create property based folder only when property is popul

Thanks Eusebiu,

That makes perfect sense.

I have seen an additional problem with the program files directory from some of my searches being re-written by something called WIN64DUALFOLDERS from c:\program files to c:\program files (x86) which is actually incorrect. Is there a way of preventing this re-write? I have to deploy scripts to both the 32bit and 64bit versions of Photoshop and right now its doing ProgramFiles x86\Adobe\Photoshop and ProgramFiles x86\Adobe\Photoshop 64bit the second of which is incorrect.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: create property based folder only when property is popul

Hi,

In order to write some files in a 64-bit location (i.e. Program Files), you need to go in the "Organization" page and set the "64-bit Component" flag for them and for the folder they are located in.

You can also set the "Mark components in this feature as "64-bit component"" option for the whole feature if you need it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MSI_Exec
Posts: 3
Joined: Wed Mar 11, 2015 5:54 pm

Re: create property based folder only when property is popul

Hi Eusebiu,

It looks like the search is pulling the altered result:

The reg keys are HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\Photoshop\12.0\ApplicationPath = C:\program files\adobe\photoshopcs5\
and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Photoshop\12.0\ApplicationPath = C:\program files (x86)\adobe x86\photoshopcs5\

The results from the search are 1: C:\program files (x86)\adobe x86\photoshopcs5\ (when search 64bit is unticked) and 1: C:\Program Files (x86)\adobe\photoshopcs5\ (when search 64bit is ticked)

This is just testing the searches, I've tried setting the component as a 64bit component but it still installs to the incorrect path of C:\Program Files (x86)\adobe\photoshopcs5\
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: create property based folder only when property is popul

Hi,

I'm afraid that this is the Windows Installer normal behavior. For more details you can take a look on the Search Registry does not return Raw Value and copy file path force x86 threads which debate a similar problem.

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

Return to “Building Installers”