October 2021
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

After looking into the prospect of rolling out the OneDrive client to users, I realized users would need access to the C:\ drive as this is where the OneDrive data is stored.

A friend of mine created this .bat file which needs to be deployed as a startup script to COMPUTERS. I chose to do this via GPO.

IF NOT EXIST "C:\ProgramData\HDrivesV1.txt" (

attrib +s +h "C:\Users"
attrib +s +h "C:\windows"
attrib +s +h "C:\program files"
attrib +s +h "C:\program files (x86)"
attrib +s +h "C:\programdata"
attrib +s +h "C:\MySettings"
attrib +s +h "C:\Intel"
attrib +s +h "C:\PerfLogs"
attrib +s +h "C:\Your Company"

echo %date% %time%  Setup executed and ended with error code %errorlevel%. >> "C:\ProgramData\HDrivesV1.txt"
)