mapped-drive

In PowerShell, how can I determine if the current drive is a networked drive or not?

I need to know, from within Powershell, if the current drive is a mapped drive or not. Unfortunately, Get-PSDrive is not working "as expected": PS:24 H:\temp >get-psdrive h Name Provider Root CurrentLocation ---- -------- ---- --------------- H FileSystem H:\ temp but in MS-Dos "...

In PowerShell, how can I determine the root of a drive (supposing it's a networked drive)

In PowerShell, even if it's possible to know if a drive is a network drive: see http://stackoverflow.com/questions/158359/in-powershell-how-can-i-determine-if-the-current-drive-is-a-networked-drive-or When I try to get the "root" of the drive, I get back the drive letter. The setup: MS-Dos "net use" shows that H: is really a mapped net...

write a batch to change the path for Mapped drive.

I having server folder as a mapped network drive in workstation . Now the that folder is shifting to to another server so Ineed to change the path this activity I need to do at 400 workstations. so can you help me with script. ...

C# - Map Network drive from Web Service

We are working on a web service that has to run a 3rd party process that interacts with a mapped network drive. So we have to map this drive programmatically from the web service. I have already wrapped up WNetAddConnection2, etc. in a nicer class for another project, so I threw the code right in. Our web service is running under Ulti...

vb.net how to check if a network drive is mapped persistently

I use the following code to layout network drives on a system. I want to add a third column for persistence but in vb.net I do not know how to check if a drive has a persistent map or not. Any suggestions? For Each drive_info As DriveInfo In DriveInfo.GetDrives() If drive_info.DriveType().ToString = "Network" Then Wi...

VS2008 trying to create a new project from pre-existing C++ code on a mapped network drive

I have a bunch of source code checked out from a SVN repository, now living in a folder on a mapped network drive which happens to be a linux machine. We're using this as a build environment as it currently has the numerous libraries needed to build painlessly. What I want to do is use VS2008 on my Windows Xp development box, and create...

SUBST and console app vs. windows service

I have used SUSBST command to create mapped drive to a certain folder. In a console application I can access the directory, while I cant access the same directory in a windows service application. In other words the following line returns false Directory.Exists(@"x:\directory") where x: is defined using SUBST as follow: SUBST x: c:\x...

PHP: Mapped Network Drives

Hello all, I have mapped a network drive to a computer in my home network. Now I am trying to access it via PHP - I did this quick test: echo opendir('Z:\\'); This gives me: Warning: opendir(Z:\) [function.opendir]: failed to open dir: No error in C:\wamp\www\webs\tester-function.php on line 3 What have I done wrong here? I don'...

Accessing Mapped Drives When Impersonating in ASP.NET

Short Version: Can anyone say whether it's possible or not to use impersonation in ASP.NET to access mapped drives? Long Version: I'm currently using impersonation in ASP.NET to gain access to network files. This is working perfectly for any network file using a UNC path, but it is failing to access any files on mapped drives defined fo...

Service not able to access a mapped drive.

Hi All, I have read in many forums that mapped drives are not accessible from a service as no user is logged on. Question 1) I tried making my service as a log on - as some account and i had my network drive mapped in that very account. The service still cannot access it. Why? Question 2) From the same sevice, i invoke another process...

(yet another) problem with mapped drive via the command line

I know, I know. There are a million threads everywhere talking about problems with mapped drives. I've ready many of them but I still can's seem to wrap my head around this problem or come to a solution. I have a build server/continuous integration server (Win 2003 running CruiseControl.NET) that listens to our source control server. Wh...

Can I programmatically find out if a drive is in use?

Is there any way of programmatically finding out if a mapped drive is currently in use? If I try to unmount the drive with net use, and the drive is being used, it will tell me that the drive is in use and prompt me to take further action. I'd like to be able to unmap drive automatically if it's no longer being used. The system is a Wi...

Cannot access files on drive mapped network share from a Windows service.

I have a network shared folder mapped to a drive letter, which is accessible from Windows Explorer, from the command prompt as well as from my WinForms application without problem. It is also accessible from my Windows service using a UNC path. However, when I attempt to access this network location using a mapped drive letter from the ...

How can I find the IP address of a mapped network drive in C++?

I have a list of possible paths to use for a default input data directory (X:\Data; Y:\Data; Z:\Data). All of the possible paths are mapped network drives. I can check this using GetDriveType(pathStr) == DRIVE_REMOTE. To determine the best one, I have narrowed down the list by selecting only paths that exist. Sometimes there will be more...