mapped-drive

Why “net use * /delete” does not work but waits for confirmation in my PowerShell script?

时间秒杀一切 提交于 2019-11-28 20:07:07
I have a script where I want to disconnect from the mapped drives before I create a new PSDrive. Otherwise I get this error: New-PSDrive : Multiple connections to a server or shared resource by the same user , using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again So I have this line: net use * /delete (Unfortunately I could not find a way to disconnect from a specific mapped drive just by providing the server name so far :( ) When PS comes to this line You have these remote connections: \\ServerName\SharedFolder

Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 15:36:07
问题 Using Windows 2008 R2. On our server we get this error: "Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again." when trying to map a drive on the command line. However, there are no open Explorer windows to the remote computer, and nothing shows on the remote computer when I do a "net use". Why does windows think something is connected when "net

Mapped Network Drives

只谈情不闲聊 提交于 2019-11-28 14:03:05
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't want my users typing in the UNC path so is there a way to get the UNC path for them and maybe that will work when I try to access it? This is possible in Microsoft languages but I am not sure how to get PHP to do this - maybe using a cmd.exe command? Please note, the mapped

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

旧城冷巷雨未停 提交于 2019-11-28 12:13:44
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 Windows service, access fails. The Windows service is configured to use my personal "Log On" account credentials, which is the same in all the above cases. I am an administrator. Many customer sites utilize drive letters for network shares and I cannot always

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

心已入冬 提交于 2019-11-28 03:40:39
问题 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 "net use" shows that H: is really a mapped network drive: New connections will be remembered. Status Local Remote Network ------------------------------------------------------------------------------- OK H: \\spma1fp1

Mapped network drives cannot be listed in C#

不想你离开。 提交于 2019-11-28 00:31:52
问题 I am trying to list all local drives in my application, and DriveInfo.GetDrives give back the local drive letters, and I need the mapped drives too. Currently I have: C:, D:, and G: (HDD), E: and F: (CD), and S: and Z: (mapped network drives). (Yes, they are all visible in Windows Explorer, and in Total Commander too.) But only C, D, E, F, G are retrieved programmatically. I also tried Environment.GetLogicalDrives() , GetLogicalDriveStrings (pInvoke) , FindFirstVolume and FindNextVolumen

Find UNC path of a network drive?

自作多情 提交于 2019-11-27 17:09:00
I need to be able determine the path of the network Q drive at work for a WEBMethods project. The code that I have before is in my configuration file. I placed single character leters inside of the directories just for security reasons. I am not sure what the semi-colon is for, but I think that the double slashes are were the drive name comes to play. Question: Is there an easy way on a Windows 7 machine to find out what the full path of the UNC is for any specific drive location? Code: allowedWritePaths=Q:/A/B/C/D/E/ allowedReadPaths=C:/A/B;//itpr99999/c$/A/FileName.txt allowedDeletePaths=

Why “net use * /delete” does not work but waits for confirmation in my PowerShell script?

你。 提交于 2019-11-27 12:43:38
问题 I have a script where I want to disconnect from the mapped drives before I create a new PSDrive. Otherwise I get this error: New-PSDrive : Multiple connections to a server or shared resource by the same user , using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again So I have this line: net use * /delete (Unfortunately I could not find a way to disconnect from a specific mapped drive just by providing the server name so

Mapped Network Drives

最后都变了- 提交于 2019-11-27 08:11:26
问题 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't want my users typing in the UNC path so is there a way to get the UNC path for them and maybe that will work when I try to access it? This is possible in Microsoft languages

Java WatchService not generating events while watching mapped drives

允我心安 提交于 2019-11-27 08:02:15
I implemented a file watcher but I noticed that java nio file watcher doesn't generate events for files being copied on mapped drives. For instance, I've run the file watcher on Unix to watch a local directory ( /sharedfolder ) which is mapped on windows ( H:\ ), and then I've put a file in this directory ( H:\ ) but the file watcher hasn't generated any event. Now if I run the file watcher on windows to watcher the mapped drive ( H:\ ) which refers to a unix path ( /sharedfolder ) and from unix I put a file in this folder, the file watcher identifies the change and generates an event. It