Windows service needs access to a mapped network drive
-
I'm trying to make an application running as a service that requires access to a network mapped drive.
Anyone ever gotten this to work before?
I am trying to get a dicom server server to dup it's data on a NAS I have, but the configuration for the service won't run UNC, it requires a mapped network drive.
The software works great when I leave everything local, but I don't have enough local storage, so I want to store the data on the NAS.
-
@Dashrender You can do this but you have to know the account that is running the service and add that account to the ACL on the share.
-
@Bill-Kindle Yeah I've done that. I logged in as that user on the machine, made the drive mapping, logged out, tried the service and fail.
-
@Dashrender said:
@Bill-Kindle Yeah I've done that. I logged in as that user on the machine, made the drive mapping, logged out, tried the service and fail.
You have to use a scheduled task that runs on any user login and executes a net use command.
-
-
I guess if you only have one drive you can just put the net use in the command line for the task itself.
On the task, you set the permissions.
-
How does that execute on startup and never again?
-
Are you trying to just utilize the NAS storage capacity or are you attempting to use the NAS to share the file between different computers? If all you want to do is to utilize the capacity of the NAS, is it a NAS that can do iSCSI? If so you can use iSCSI and just map a LUN instead of a UNC path and the computer won't know the difference between it being local or it being on iSCSI.
-
@Dashrender said:
@Bill-Kindle Yeah I've done that. I logged in as that user on the machine, made the drive mapping, logged out, tried the service and fail.
with the /persistent flag?
-
@Carnival-Boy said:
@Dashrender said:
@Bill-Kindle Yeah I've done that. I logged in as that user on the machine, made the drive mapping, logged out, tried the service and fail.
with the /persistent flag?
I didn't map it using the command line, but I did check the box for persistence when I did it, also the mapping was still there when I logged back into that user account later.
-
Did you manage to get this working?