Why does DriveInfo.GetDrives() not get network mapped drive in windows service

Viewed 4350

I have a windows service developed in .NET C# using VS 2010, I'm calling the DriveInfo.GetDrives() but it is not getting the Z: drive (a mapped network drive),

I did some googling and found some results pointing to windows account privileges, so I have tried all account types of service installer such as LocalSystem, User, LocalService, NetworkService but none worked and I still can't get the drive Z:.

I did another test, debugging the windows service (as a console application) and I can get drive Z: that way.

Is there a solution to my problem?

2 Answers
Related