0

On a user's computer, how can I retrieve a file from a network share that the user doesn't have permission to access?

I often find myself at a user's computer needing to [re]install this or that program that's exclusively on our IT share. Many times they will leave or step away or there's something going on where I can't logout, login as admin, get it and then log back in. I can't keep a copy of every file with me and accessing USB ports isn't always an option (permissions).

Windows 7/10, Active Directory

1 Answer 1

0

First, open a command prompt (perhaps elevated)

runas /user:_yourDomain_\_yourUsername_ cmd

Example:

runas /user:contoso\dsmith cmd

Then, to copy the file, you map the network drive

net use _newDriveLetter_: "\\_myServerName_\_myShareName_”

Example:

net use z: "\\fileserver01\InstallFiles"

Then copy the file you want:

change to the Z: drive

z:

Change to the directory

cd "ImgBurn"

Copy the file to the local computer

copy _filePath_ _destinationFolder\

Example:

copy IMgBurn_2.5.7.0.exe c:\temp\
3
  • 2
    Mapping the drive can be done as one step to avoid the runas command. The command would become net use z: "\\fileserver01\InstallFiles" /user:contoso\dsmith Nov 6, 2017 at 19:13
  • While this answer is one way of doing what you wish, be aware that when you mount a network drive in user's desktop, you are subjecting this network share to a myriad of viruses user might have had installed since this morning, or since your AV software got updated, whatever. This approach works, but is Wrong. Capital W. Use read-only shares instead, nothing wrong with users seeing these, administrator is still required for a software piece to be installed on your domain computers... right?
    – Kitet
    Nov 6, 2017 at 20:30
  • Kitet, that's a good point, except the tech in the field would be the one with read-only access and the user have no access, and then the tech would still use the access method in this answer. Presumably there would have to be a separate credential for adding install files to the network share. If you're saying that the user always have read-only access then that's opening up the hole that we wanted closed in the first place: unlimited access to install files that may or may not need an install key, and therefore a licensing fail. Nov 7, 2017 at 14:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .