Windows – Use NET USE to mount a network drive as read only

drivemountnet-usenetwork-sharewindows

I'm using the following code to mount a network drive in a script that configures desktop icons and favorites by copying them when the user logs into windows.

NET USE W: \\Server\Files\IT\auto /user:"DOMAIN\username" "password"

I have read the question How to mount a drive with read only permission but it's asking about linux.

Does anyone know how to mount a network drive as read only via script?

Best Answer

You'll want to set the permissions on the share such that it only allows read access. This is something that can be done pretty easily. If you've got a share right click on the folder, and select properties. enter image description here

Go to the sharing permissions tab and select "permissions" then uncheck all boxes except the read box for that user (or group.)

enter image description here