I currently have a logon script that is set to replace the local machine Hosts file with that of a modified hosts file.
The problem that I am running into is that the original hosts file on the local machine is read-only, so the file is not copied over. I figured that out after removing the read-only access and then running my script again.
I am looking for the code snippet to remove the "read-only" permission before the script attempts to copy the file.
Can anyone show what the line of code I need for this?
copy "\\server\share\Hosts\*.*" "%systemroot%\system32\drivers\etc\" /Y