cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hh1234
Level 5

Check for a folder...

Hi. How do I check for the existance of a FOLDER? I want to do this:

IF "C:\Windows\Microsoft.NET\Framework\v4.0.30319" EXISTS THEN
Delay(1)
ELSE
Install .Net Framework 4.0
End

Thanks.
Labels (1)
0 Kudos
(3) Replies
rrinblue22
Level 9

ExistsDir InstallScript function should help you
0 Kudos
hh1234
Level 5

Thanks, that helped. Now, I have this code:

#include "ifx.h"
function OnFirstUIBefore()
number nResult, nLevel, nSize, nSetupType;
string szTitle, szMsg, szOpt1, szOpt2, szLicenseFile, svVer;
string szName, szCompany, szTargetPath, szDir, szFeatures;
BOOL bLicenseAccepted;

begin
svPath = "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319";
if (ExistsDir (svPath) = EXISTS) then
MessageBox("Your folder is there ",0);
endif;
end;

And when I run this it gives me error "undefined identifier" what am I missing here?

Thanks.
0 Kudos
hh1234
Level 5

Found my error. I did not define svPath 😞
0 Kudos