This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Oops
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 23, 2011
11:05 AM
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.
IF "C:\Windows\Microsoft.NET\Framework\v4.0.30319" EXISTS THEN
Delay(1)
ELSE
Install .Net Framework 4.0
End
Thanks.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 23, 2011
01:30 PM
ExistsDir InstallScript function should help you
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 23, 2011
03:27 PM
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.
#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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 23, 2011
03:40 PM
Found my error. I did not define svPath 😞
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)