BUG Windows TrustedInstaller denying access to my own folder by changing premissions

TimidWriter 96 Reputation points
2021-02-03T15:22:18.957+00:00

Hello again,

I've posted this a few days ago. But I got no response. So here is my problem again. TrustedInstaller keeps altering my "r:\Program Files" (RProg) folder that is not on the system drive. I have a "C:\Program Files" (CProg) folder that was created by Windows 7 and then upgraded to Windows 10. RProg folder has been running without any issue for years in Windows 10. But recently Windows 10 decided to change my permission every time I reboot, denying me access to my own folder and breaking dozens of applications in the process. The folder contains tons of files that I access/modify on a regular basis. I need to have full control. I cannot rename the folder, as it will affect literally over a decade worth of settings in different applications. It's not negotiable. It's my folder, not Microsofts.

Went through MS helpline but it was unsatisfactory. Solution was to rename the folder or using icacls (icacls "r:\Program Files" /grant Everyone:M). With the help of the internet, I altered it to make it work. I created this batch file:

REM __icacls "r:\Program Files\ModifiableWindowsApps" /grant Everyone:M
takeown /F "r:\Program Files\ModifiableWindowsApps" /A /R /D Y /SKIPSL >nul 2>&1
icacls "r:\Program Files\ModifiableWindowsApps" /reset
icacls "r:\Program Files\ModifiableWindowsApps" /grant:r Administrators:(OI)(CI)F /inheritance:e /Q /C /T /L >nul 2>&1
rmdir "r:\Program Files\ModifiableWindowsApps"

icacls "r:\Program Files" /q /c /t /reset
pause

It works but it takes forever as the folder contains tens of thousands of files and thousands of directories. It's not a satisfactory solution.

Please, someone must know a way of telling UnTrustedInstaller which folders it can use. I really do not know what changed to make it behave this way. Apart from updates the only new thing I installed is Minecraft from App Store, but according to settings the game is installed on default C drive. The R drive is my personal drive that contains much of my work.

Thank you for your time

Windows for business | Windows Client for IT Pros | Devices and deployment | Configure application groups
0 comments No comments
{count} votes

Accepted answer
  1. TimidWriter 96 Reputation points
    2021-02-05T17:13:10.033+00:00

    I finally figured out the cause. It was Forza. I had initially installed it on R drive then I stopped and I decided to move it to S due to space issues.

    Well I fixed it, but no clue how exactly. But now it no longer creates any folders and does not mess around with the premissions. Used a lot of powershell commands and all other stuff from internet. One of them or a combination fixed it.

    So once you installed something from the Store and remove it, it it dictates not just the ModifiableWindowsApps inaccessible but the parent folder, even though the folder is empty. What a pain in the ass. I thought Steam was bad, but Microsoft Store takes the biscuit. Absolute pain.

    @MotoX80
    Thank you for the help

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. MotoX80 36,401 Reputation points
    2021-02-03T17:37:15.643+00:00

    It's not negotiable. It's my folder, not Microsofts.

    When it comes to a "Program Files" folder where you have installed software, I'm going to have to disagree. The installer is going to try to maintain the permissions that software installations have told it to use. Anything different might prevent the software from functioning.

    Did you install software into "R:\Program Files"? From what I know (I could be wrong!) the Windows Installer won't know anything about that folder unless you installed something there.

    See my comments in this thread.

    https://learn.microsoft.com/en-us/answers/questions/216387/i-can-no-longer-make-folders-in-program-files-x86.html

    What is the main folder in question? ModifiableWindowsApps? That is part of the Store. The default permissions on my system only allows Users List access. I would not recommend modifying permissions on that folder.

    https://www.windowslatest.com/2019/07/20/modifiablewindowsapps-folder-in-windows-10/

    On my test machine the Users group only had read access to the Filezilla folder. I checked off full control and that has not changed through multiple reboots.

    63480-capture.jpg

    I also manually added a "MyApp" folder and set permissions. Again, through multiple reboots that has not changed.

    63595-capture1.jpg

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.