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
- :
- Re: Readonly Folder
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
Mar 30, 2011
01:01 AM
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 01, 2011
02:48 AM
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..
Is
http://kb.flexerasoftware.com/doc/Helpnet/InstallShield2011/mergedProjects/installshield17langref/LangrefIs.htm
I wonder if the FILE_LOCKED option will work..