Jump to content

"Grayed Condition" question


Recommended Posts

Hi!

I don't understand how exactly work this option.

I want to disable the checkbox if the program was already installed, for this I test if some folder exists.

In the "Grayed Condition" field I wrote:

FileExists('C:\TEST')

and the checkbox is allways checked doesn't matter if the directory exists or not.

What is my error? I need another function and not FileExists?

Thanks!!!

Link to comment
Share on other sites


Ok. I made some tests...

The function FileExists works ok for files... for directories the result is the same... don't matters if the folder exists or not.

So... to test if .Net framework v 2 is installed THIS WORK:

FileExists('%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\Accessibility.dll')

but this doesn't work (the checkbox is allways checked):

FileExists('%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\')

How I can test if a DIRECTORY exists? (an empty directory)

Thanks!

Link to comment
Share on other sites

Ok, put in your grayed condition.... It will not look for an empty folder. You have to tell it a file that is in that folder.... then to get it to uncheck that item if it is installed, go to the "Options" area and change the "Check on load?" option to Defaults.... any thing that is installed will be unchecked automaticly.

Hope this helps :-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...