Protect a folder

Posted on 2006-04-24
Last Modified: 2013-11-20
How can only my program access a specified folder on WinNT, 2000 and XP ??
Question by:SalvaThor
    LVL 14

    Expert Comment

    you want to protect the folder as long as your program is running?
    Or you want that folder to be protected for that program forever (even when the program is not executing) ?

    Author Comment

    Yes, I only want to protect the folder as long as my program is running.

    Author Comment

    I want to protect my folder when my app is running only and
    only "administrator" account can access or see it, but the
    current user don't.

    LVL 14

    Accepted Solution

    You can protect the folder using

     Netapi32.lib, Svrapi.lib & Netapi32.dll. Svrapi.dll

    These liabraries exports the function to set and delete the shares and security for a perticular directory.

    You can brows through this:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now