Searcher64
Posts: 19
Joined: Sun Jan 22, 2012 3:29 am

Search Folder On All Drives

Thu Apr 12, 2012 10:54 pm

Hello


My problem is using the Search Folder function. I use the wizard, "Search for a folder" and try to have the installer search for a folder on my computer named "Adobe" on all fixed drives, with a 10-deep directory search. I test it, and nothing comes up (yes, I do have a folder named Adobe in C:\Program Files (x86)\Adobe). The result was nothing. I tried the same step, but this time I made it search for a folder named "testmovs" (which I have in C:\testmovs). This time, it was successful. I did other tests, and found out that searching on all drives for a specific folder only works for folders that is not in anything else except the drive. This doesn't happen with files though, only folders.

Image

Image

Is it not as simple as it seems?

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Search Folder On All Drives

Fri Apr 13, 2012 10:30 am

Hi,

I tested your scenario and when a search for folder is performed on 32-bit systems no problems were encountered. Indeed, it seems to be a problem when searches, with search depth grater than 1, are performed on 64-bit systems. Unfortunately this is a Windows Installer problem because the searches are performed through Windows Installer standard action "AppSearch". Our "Search for applications and resources" feature uses Windows Installer function. However, you can try to implement a correct search using a custom action.

Regards,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Searcher64
Posts: 19
Joined: Sun Jan 22, 2012 3:29 am

Re: Search Folder On All Drives

Fri Apr 13, 2012 2:03 pm

So how would I do a search with custom action? It seems that custom actions are dependent on the Windows Installer "AppSearch"


Or is there a way to use the Search function for files, and able to take the directory of the file somehow?

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Search Folder On All Drives

Tue Apr 17, 2012 9:34 am

Hi,
So how would I do a search with custom action?

Please keep in mind that Custom actions are actions entirely defined by the user. They can be executable files, dynamic linked libraries, Visual Basic scripts or JavaScript files. So, you can write your own code (i. e. a dll or a script file) that will perform a search for folders. Also, you should add your custom action to your project on Custom Actions page.
Or is there a way to use the Search function for files, and able to take the directory of the file somehow?

If you want to use the Search for files function, also, you will need a custom action that will parse the returned result by this function and will extract your desired result.

Regards,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”