Prerequisite Install Conditions - File Location Failure - Advanced Installer Community
lochiano
Posts: 4
Joined: Mon Mar 25, 2013 5:01 pm

Prerequisite Install Conditions - File Location Failure

We are trying to detect when any of several device drivers are installed, and if not we will install a 'default' device driver.

We have four "File Version" tests (simply checking for the existance of a named file). If all of these tests fail, then we will proceed to install the default driver.

One of these tests is never locating the desired file, even though we can see it in the standard OS file explorer. We have also attempted an alternate approach with a custom file search. That panel has a built in file/directory browser and we cannot see the required file in this file brower.

The file does have a space it the name:
C:\Windows\System32\Control Panel_Betteryless.exe
and we have attempted to specify the test both with this string quoted and unquoted.

The file does not have any special properties set....such as hidden.

Any suggestions?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisite Install Conditions - File Location Failure

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

I'm not sure why you encounter this behavior, can you try to remove the value in the "Minimum" text field of your "File Version" search to see if the behavior persists? The space in the name of the file shouldn't be a problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lochiano
Posts: 4
Joined: Mon Mar 25, 2013 5:01 pm

Re: Prerequisite Install Conditions - File Location Failure

Yes, we had already tried testing with no information in the minimum version field (also with just a 0).
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisite Install Conditions - File Location Failure

Hi,

I'm afraid that this happens because on a 64-bit Windows a 32-bit application looks automatically in the "SystemWOW64" directory instead of "System32" directory.

So, in order to achieve what you want you can follow the steps below:
- go in the Install Parameters and create a new property (i.e. MY_PROP)
- go in the Custom Actions page and create two "Set installer property" custom actions above the "Wizard Dialogs Stage -> Searches" action group with the following settings:
  • Property: MY_PROP
    Formatted: [SystemFolder]
    Condition: NOT VersionNT64

    Property: MY_PROP
    Formatted: [System64Folder]
    Condition: VersionNT64
- go in the Search page, create a new "File Search" and choose "Add location -> Folder" from its context menu
- in the "Name" text field write the name of the file you want to search (i.e. Control Panel_Betteryless.exe)
- in the "Path" text field write the folder that contains the file (in your case [MY_PROP] instead of [SystemFolder])
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

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

Return to “Common Problems”