Folder Access


  1. Posts : 9
    Windows 10
       #1

    Folder Access


    Sorry if this post is long-winded, it's difficult to explain briefly.
    We have some old software written in vb6. It creates a folder under the user's Documents folder (by default) and copies files into it from an install folder (it's done like that so the user can locate the target folder anywhere, so it's not necessarily below Documents). In a noticeable number of cases access to this target folder is failing saying the user doesn't have access, it's our strong belief that this is the virus checker blocking the app. In many cases the users are elderly people who have no clue how to configure things so that the app can gain access and have no desire to learn.

    I'm looking for suggestions how to avoid this. Any of the following would be useful: a way to gain access, a location that the user would always have access to, a way to register the app with any virus checker, anything else!
      My Computer

  2. Caledon Ken's Avatar
    Posts : 24,812
    Windows 10 Pro x64 Version 21H1
       #2

    Hi Ian

    You would have to check if this is what is enabled?

    Enable or Disable Controlled Folder Access in Windows 10

    You said AV but there are so many different AV's out there it is hard to tell. I'm pretty sure BitDefender also has this feature and I can see a day where all products will have same. Helps with the protectin of Ransomware.

    You will notice at the bottom of tutorial there are link's to other related subjects like this one

    Add or Remove Allowed Apps for Controlled Folder Access in Windows 10

    While it is nice to allow users freedom you are creating a support nightmare with this freedom that you are already living. Not sure if you noticed but even as an admin you can't write a file to the root of c:. You can create a folder on C: and then use the folder.

    Even programs like FF and Chrome say this is where your profile is going. You can move after the fact, at least with FF, but to install this is where it is going.
      My Computer

  3. Try3's Avatar
    Posts : 8,371
    Windows 10 Home x64 Version 21H1 Build 19043.1052
       #3

    Ian,

    In addition to Ken's useful comments about CFA, there are other potential constraints that could cause errors.

    1 UAC
    It might not be antimalware protection itself at work but 'User account control', a protection feature of the Windows OS.
    If the software was written before Windows Vista then this constraint will probably not have been taken into account in its design.

    If your software tries to write to a protected folder such as Program files folder or
    If your software tries to write to the Registry outside of the Current user section or
    If your software tries to change anything that affects other users of the computer [whether there are other users or not]
    then
    it must be run with Admin permission, i.e. with elevated privileges, or it will encounter access denied problems.

    To investigate the problem you would need to identify the folders that it is being denied access to and then check the Permissions of those folders.

    2 Compatibility mode
    It is also possible that the software needs to be installed in 'Compatibility mode' for the OS for which it was written.

    3 User folder relocations
    User folders such as Documents etc are, by default, at C:\Users\%Username%\Documents etc
    They can be 'relocated' elsewhere
    Your software must have a reliable means of identifying the user folder path or it will encounter errors on some computers.
    {Not relevant to the current problem but if I found that an installation attempted to install to one of my user folders I would stop and throw it away.}

    Denis
    Last edited by Try3; 12 Apr 2020 at 11:40.
      My Computer


  4. Posts : 9
    Windows 10
    Thread Starter
       #4

    Ken, Thank you for all your suggestion but I'm sure I do all those things properly, for example it INSTALLS in Program Files (x86) without issue, it doesn't from then on attempt to write to any protected folder, the only folder it writes to is the one below the users' Documents folder, it only uses the current user area of the registry and it runs in Compatibility mode. Your last point though has me puzzled, it can't write to a protected folder so where else is it supposed to store its' files other than a folder in the user account? It does already correctly locate the Documents folder (by Windows api), if it can't install files below that folder what is its alternative?
      My Computer

  5. Try3's Avatar
    Posts : 8,371
    Windows 10 Home x64 Version 21H1 Build 19043.1052
       #5

    So which folders are you getting access denied errors for and what type of files are you trying to write in them?

    Denis
      My Computer


  6. Posts : 9
    Windows 10
    Thread Starter
       #6

    Try3 said:
    So which folders are you getting access denied errors for and what type of files are you trying to write in them? Denis
    As per my original post "In a noticeable number of cases access to this target folder is failing saying the user doesn't have access", that is the folder it creates below Documents. It only copies text files.
      My Computer

  7. Try3's Avatar
    Posts : 8,371
    Windows 10 Home x64 Version 21H1 Build 19043.1052
       #7

    Ian,

    In the failure cases does C:\Users\%UserName%\Documents exist or is the failure associated with user folder relocations?

    Denis
      My Computer


  8. Posts : 9
    Windows 10
    Thread Starter
       #8

    Try3 said:
    Ian,
    In the failure cases does C:\Users\%UserName%\Documents exist or is the failure associated with user folder relocations?Denis
    There are NO relocations and the Documents folder does exist at the default location that you show below Users.
      My Computer

  9. Try3's Avatar
    Posts : 8,371
    Windows 10 Home x64 Version 21H1 Build 19043.1052
       #9

    Ian,

    Then I don't know what to suggest. Since the failures are not caused by the absence of C:\Users\%UserName%\Documents then I'd expect any access errors to happen all the time or none of the time.
    - I assume that the application looks for and avoids trying to create a folder path that already exists.
    - I assume that the access denied msg does not provide any further information to help focus the investigation.
    - I assume that there is nothing unusual in the permissions of the parent folder within which the access denied problem folder is located.

    Denis
    Last edited by Try3; 13 Apr 2020 at 17:46.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 18:48.
Find Us




Windows 10 Forums