Since you didn't provide much information, so my answer will be a guess.
"The system cannot find the path specified"
It obviously means the path does not exist. However, there is one exception: paths with space. To let cmd
and batch file
properly handle space, you will need to "quote"
them. And, as @Mofi mentioned that it could be that the user's profile directory is not C:\Users\%USERNAME%
So my best guess to fix both problems, you should change the command to:
icacls "C:\Users\%Username%\AppData\Local\Mozilla\updates" /q /c /t /deny users:F
or this better solution suggest by @Mofi:
icacls "%LOCALAPPDATA%\Mozilla\updates" /q /c /t /deny users:F