locked
creating a hidden files RRS feed

  • Question



  • hi all,

     i want to save my app settings in a file. if the user delets that file then it would crash the application. so i want the file to be hidden from the user. More Over i add the file in .cab file setup project, such that it does not create any problem , if i have to  sign my application i.e the files are not dynamic.

    i want these files to be hiddenfrom the user or i want these files not to be deleted by the user at any cause.

    awaiting for your reply.

    Thanks
    sadiq
    Monday, July 28, 2008 7:05 AM

Answers


  • Hi sadiq
    You can proceed in this way:
     
    Code Snippet

    System.IO.FileInfo FInfo = new System.IO.FileInfo("Your file full path");
    FInfo.Attributes = System.IO.FileAttributes.Hidden;


    Regards
    Hammadi
    Monday, July 28, 2008 7:47 AM

All replies


  • Hi sadiq
    You can proceed in this way:
     
    Code Snippet

    System.IO.FileInfo FInfo = new System.IO.FileInfo("Your file full path");
    FInfo.Attributes = System.IO.FileAttributes.Hidden;


    Regards
    Hammadi
    Monday, July 28, 2008 7:47 AM
  • hi

    i have used the above mentioned api, but only in 2003 the files are hidden, in 5.0 and 6.0  are not hidden. why the files are not made hidden in 5.0 and 6.0.

    awaiting for your reply.

    thanks
    sadiq
    Saturday, August 9, 2008 6:20 AM