cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Madhu_Mitra
Level 3

Readonly Folder

Hello,
I have created a folder "Test" under C:\Program Files. Now the folder "Program Files" shows readonly. When I execute the following code from Installshield szDir="C:\Program Files", I get the message read only but when
szDir="C:\Program Files\Test", it does not display the message. My problem is I am not able to execute some SQL Query using this folder. How do I find that "C:\Program Files\Test" is also a readonly folder from InstallScript.



if (GetFileInfo (szDir, FILE_ATTRIBUTE, nvResult, svResult) = 0) then
// Test for no attribute.
if (nvResult = FILE_ATTR_NORMAL) then
else
if (FILE_ATTR_READONLY & nvResult) then
MessageBox ("This is a read only file. Choose some other desination.", SEVERE);
endif;
endif;
endif;*/


Cheers
Madhu
Labels (1)
0 Kudos
(1) Reply
weakness
Level 6

I'm not sure but why don't you use IS function?

Is
http://kb.flexerasoftware.com/doc/Helpnet/InstallShield2011/mergedProjects/installshield17langref/LangrefIs.htm

I wonder if the FILE_LOCKED option will work..
0 Kudos