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

SetupTypeDlg PathEdit Autofill/Search

On SetupTypeDlg, this is the page where you find the directory where you want your app installed. What I need though is to install into an already-existing directory with a specific file inside. How is it that I am able to do this?

I want the PathEdit box to automatically find the folder using the Search function, and autofill the box with that directory but I can't seem to change the Property Name from APPDIR to something else'

After that step is done, I want the the Custom/Typical/CompleteInstallButton to check the directory that was inputted into PathEdit to see if it has that specific file, and if it doesn't the button will be disabled. Problem is that I don't know the property name of the directory inputted into the PathEdit...

In other words, I want to add a check file/folder function

Any help would greatly be appreciated....
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: SetupTypeDlg PathEdit Autofill/Search

Hello,

I believe you are looking for this article.
I want the the Custom/Typical/CompleteInstallButton to check the directory that was inputted into PathEdit to see if it has that specific file, and if it doesn't the button will be disabled.
You can add a control condition for that button from the dialog editor page. The condition should be the search name.
http://www.advancedinstaller.com/user-g ... ialog.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Searcher64
Posts: 19
Joined: Sun Jan 22, 2012 3:29 am

Re: SetupTypeDlg PathEdit Autofill/Search

mihai.petcu wrote:Hello,

I believe you are looking for this article.
I want the the Custom/Typical/CompleteInstallButton to check the directory that was inputted into PathEdit to see if it has that specific file, and if it doesn't the button will be disabled.
You can add a control condition for that button from the dialog editor page. The condition should be the search name.
http://www.advancedinstaller.com/user-g ... ialog.html

All the best,
Mihai

Yes I have tried adding a search to correspond with the button but how would I use the Search function to find a file in the directory that the user put in "PathEdit"? I tried using the directory search of "APPDIR" since I don't know what location search to add, but that seems to only search for the default directory to install that I had inputted which comes up with nothing

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: SetupTypeDlg PathEdit Autofill/Search

Hi,

I'm afraid I don't understand. Why would you need to search for a file that the user already browsed to on the target machine?

However, please keep in mind searches are performed at the beginning of the installation, before the dialogs are displayed.

Also, please be more specific about what and why are you trying to accomplish. Perhaps exemplify.

Maybe this article is what you are looking for.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Searcher64
Posts: 19
Joined: Sun Jan 22, 2012 3:29 am

Re: SetupTypeDlg PathEdit Autofill/Search

mihai.petcu wrote:Hi,

I'm afraid I don't understand. Why would you need to search for a file that the user already browsed to on the target machine?

However, please keep in mind searches are performed at the beginning of the installation, before the dialogs are displayed.

Also, please be more specific about what and why are you trying to accomplish. Perhaps exemplify.

Maybe this article is what you are looking for.

All the best,
Mihai
Okay, I'll try.

What I want is to have buttons check if the directory inputted into the PathEdit Box has a specific file. In order to do this, as you have said, you have to make a Search function.

But how would you use the Search function to search the user-input PathEdit? For example my default installation path that I set is [ProgramFilesFolder]. I can set a Search function to find the file in [ProgramFilesFolder] but it would do no good since the files has to be extracted into a directory with that file.

So the user has to input his own directory install path in PathEdit box. But how would I make a Search for that directory install path that the USER inputs, not me?

---

I use the Search Wizard, "Search for a file", search for myfile.exe, but here's where the problem is. I need to input something in place of [APPDIR] for the 'In a specific folder' field. But I don't know what the property name for the custom user-input install path that the user put for PathEdit is.

I hope you understand :)

Or in the simplest way I can possibly do this is...

Maybe you can provide a step-by-step as to how I am able to have the buttons check the directory for the file? ^^
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: SetupTypeDlg PathEdit Autofill/Search

Hello,

You should follow the article I mentioned in my previous post. In the "Specifying the dialog filters" section you can read about adding the file as a filter. This way the user can select it directly and the result will be placed in AI_OFN_FILEPATH property.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”