Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Unable to delete virtual directory


2 replies to this topic

vishalv

vishalv
  • Full Members
  • 39 posts

Posted 18 August 2005 - 16:24

hi,
How to remove the read only attributes of a folder/file which is installed by dynamic file linking?
Regards,
Vishalv



jrcoldinmn

jrcoldinmn
  • Members
  • 16 posts

Posted 18 August 2005 - 18:14

Try this...
CODE
    // Files copied from SETUPEXEDIR have their attributes set to
       // read-only.  These files must be modified to clear the read-only
       // attribute.    
             
   
       // Get the first *.mmm file  
       svDir = INSTALLDIR + "Data\\";
       svFileSpec = "*.mmm";
       nvResult = FindAllFiles (svDir, svFileSpec, svMatchingFileName, RESET);

       while(nvResult = 0)
       
           // Clear the file's attributes.
           SetFileInfo (svMatchingFileName, FILE_ATTRIBUTE, FILE_ATTR_NORMAL, "");

           // Find the next matching file name.
           nvResult = FindAllFiles(svDir, svFileSpec, svMatchingFileName, CONTINUE);
       endwhile;    



vishalv

vishalv
  • Full Members
  • 39 posts

Posted 23 August 2005 - 11:25

Hi,
Thanks a lot for the code snippet. This piece of code works like a charm.

I have another query.
I am unable to change a virtual directory on upgrading my installation.
The problem is that after upgrade, the virtual directory should point to a different folder.
I have tried to delete the virtual directory through some VC++ code, before the file copy for the upgrade happens.But this is not successful.
Any light in this matter will be extremely helpful.

Regards,
Vishal