locked
A BHO writing to the file System in Vista RRS feed

  • Question

  • I am working on a BHO in c# and i want to be able to write to the file system to a directory that can be accessed by all users. So far, i have been able to write to the file system using the GetTempPath() to this path "C:\Users\UserName\AppData\Local\Temp\Low" that's great since do not need to save my files permanently but i want my directory to be visible to all users. I can't manage to find a Low directory accessible by all users.Is there one?
    Friday, May 29, 2009 5:21 PM

Answers

  • There is no low integrety directory. You need to create one then add permission so a low integrety user can access it. Usually the permission change is done at install time by changing the access control list (ACL) of the folder object. 

    If you need example code in your favorite programming language, go to Google code search, select the language, and look for code that contains the APIs you need.

    MSMVP VC++
    • Marked as answer by CrazyBug Friday, May 29, 2009 8:05 PM
    Friday, May 29, 2009 7:42 PM
  • You can probably create one (during your installation, under CSIDL_COMMON_APPDATA\yourcompany\yourapp\commonlow\ or something), but the real question is 'Why'?

    • Marked as answer by CrazyBug Wednesday, January 20, 2010 11:49 AM
    Friday, May 29, 2009 6:31 PM

All replies

  • You can probably create one (during your installation, under CSIDL_COMMON_APPDATA\yourcompany\yourapp\commonlow\ or something), but the real question is 'Why'?

    • Marked as answer by CrazyBug Wednesday, January 20, 2010 11:49 AM
    Friday, May 29, 2009 6:31 PM
  • You can probably create one (during your installation, under CSIDL_COMMON_APPDATA\yourcompany\yourapp\commonlow\ or something), but the real question is 'Why'?

    Tanks for the quick reply :-)
    The files that my BHO is creating are used by another application.
    Now, does anybody know how can i create a low integrety directory in c#.
    Friday, May 29, 2009 7:32 PM
  • There is no low integrety directory. You need to create one then add permission so a low integrety user can access it. Usually the permission change is done at install time by changing the access control list (ACL) of the folder object. 

    If you need example code in your favorite programming language, go to Google code search, select the language, and look for code that contains the APIs you need.

    MSMVP VC++
    • Marked as answer by CrazyBug Friday, May 29, 2009 8:05 PM
    Friday, May 29, 2009 7:42 PM
  • That's great.Thank you  Sheng Jiang.
    Friday, May 29, 2009 9:17 PM