As I understand it, a mapped drive isn't available to a standard user when it was created by an administrator and vice versa. Is there a way to tell programatically how the drive was mapped? By an Admin or by a standard user? I know about the Registry entry EnableLinkedConnection, which allows mapped drives to be available to all, but I don't want that to be necessary.
EDIT: Here's a scenarios I'm running into. A drive is mapped as an administrator. But a program running with standard rights can't see that drive.
Thanks
If you are an administrator on the server you can open the computer management snapin and view sessions under shared folders. This will show you which user credentials were used. To open the snapin, use Windows Explorer and right click on "This Computer" and select manage.
The $ designates an administrative share. For example, C$ represents the C: volume on the remote computer. Administrative shares also allow access to other resources, such as printers connected to the remote machine ( print$ ).
To check the path of a network drive using File Explorer, click on 'This PC' on the left panel in Explorer. Then double-click the mapped drive under 'Network Locations'. The path of the mapped network drive can be seen at the top.
In order to map a network drive, the user will need an account on both the machine they will be using and the main admin server machine with the same username and password.
I assume your code is running on a Windows7 or newer box.
As Sorceri hints in his comment, your app might be running under standard rights, and you used elevated rights to map the drive.
If this is the case, you have 2 solutions:
Either set the program to run with higher privileges
Check the share and file security on the share you are mapping.
Hopes this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With