Reputation: 60
in our Scenario we have a SharePoint-site that should be mounted as a drive on Windows Server 2012, so that an application (ABC) which runs as a windows-Service can access some files. The mapping to the drive is executed by this Service (ABC) by starting a batch-file (within this batch-file the "net use"-command is used).
The Windows-Feature "Desktop Experience" is already installed on our new Windows Server 2012 machines. Also the Service "WebClient" is running.
Everything is running with the same Windows-User.
The main problem is that when running ABC as a service the files on the mapped drive cannot be accessed. When I run ABC from command line and not as service everything works fine.
I need a solution escpacially for Windows Server 2012. But I also tried to solve the problem on older 2008 and 2003 Windows Servers. On Windows Server 2003 everything works fine. On Windows Server 2008 I have the same problem as on our new Windows Sever 2012 machines.
Unfortunately the application (ABC) cann't handle UNC-paths, so I must use the mapping.
I know that there's some solution for this problem, because an ex-workmate already solved the same issue for a Windows Server 2008 machine.
Perhaps someone has an idea what can be done.
Many thanks in advance.
Upvotes: 0
Views: 165
Reputation: 60
I found a solution on https://social.technet.microsoft.com/Forums/windowsserver/en-US/b85352de-3779-45bc-9fa9-65ef92a3d7a2/environment-variable-username-on-windows-2008-sp2.
The problem was that the USERNAME-variable was set to SYSTEM in the environment-variables.
Upvotes: 0