Page 2 of 2
Re: Map network drive in Explorer - not in XY!
Posted: 05 Sep 2011 17:44
by petersboulton
nas8e9 wrote:In all, I should have gone to the movie...
If I've read the entire thread correctly, the remaining problem is the inability of WE to see a mapping created by an elevated instance of XYplorer. That scenario I've tested in the same way as your movie shows, without getting your problem.
<snipped rest of message>
No, the remaining problems are as shown in my movie! That is:
- XYplorer launched from my desktop as Administrator -> Create mapping in XYplorer = mapping not reflected in User mode Windows Explorer / file-open boxes.
- Windows Explorer in User mode -> Create mapping in Windows Explorer -> Does not show in XYplorer in Admin mode.
One more observation. I also get this:
Launch Windows Explorer as Admin -> Create mapped drive -> Mapped drive still does not appear in XYplorer running as Admin. Yep, I did refresh!
Guys, I think this is a bug / multiple bugs. I'm happy to provide all reasonable information about my setup to help @Don fix it but, to be honest, I'm running out of time having to 'prove' to (some of) you that there is a bug! I think there are a number of permutations between which application and which context creates / sees or doesn't see the mapped drive and they don't all work.
I hope @Don will be able to fix it. @Don, please ask me for any technical information you need as I'd like to help. However, I'm not spending any more time 'proving' to anyone that there is an issue here as I don't think anyone can question the time it must have taken me making these posts and recording the screen movie which clearly shows the problem - no offense meant (to anyone)!
Pete
Re: Map network drive in Explorer - not in XY!
Posted: 05 Sep 2011 18:02
by admin
I repeated my tests with an elevated instance of XY (Run as Administrator) and found issues indeed:
1) map network drive using WE: it shows in XY, but needs a manual refresh.
2) map network drive using XY: it does not show in WE.
3) unmap network drive using WE: it is not unmapped in XY.
4) unmap network drive using XY: it is not unmapped in WE.
No idea what causes this, apart from the usual suspect: UAC.
Technical info: I use a straight call to APIs WNetDisconnectDialog and WNetConnectionDialog for the job. So whatever happens is completely outsourced to the shell.
Re: Map network drive in Explorer - not in XY!
Posted: 05 Sep 2011 18:14
by petersboulton
admin wrote:I repeated my tests with an elevated instance of XY (Run as Administrator) and found issues indeed:
<snipped for brevity>
Technical info: I use a straight call to APIs WNetDisconnectDialog and WNetConnectionDialog for the job. So whatever happens is completely outsourced to the shell.
If I do similar tests using only Windows Explorer (WE) I get the following, where I have an Admin WE and and User WE side by side on my desktop:
- Create mapped drive in Admin -> Shows instantly in a User WE
- Disconnect in Admin -> Disappears instantly in a User WE
The other way round I get:
- Create mapped drive in User -> Shows instantly in Admin WE
- Disconnect in User -> Disappears instantly in Admin WE
All of the 'appear' and 'disappear' are without an F5 refresh in either instance.
This is how I think XYplorer should work also - I hope you agree.
Finally, with regard to your TechnicalInfo point, yes, that's fine but WE presumably also uses the shell too and works?
Thanks for taking the time to check out the permutations too - obviously this makes it more complicated than my original descriptions suggested but at least tying the problem to the user vs admin issues gets a bit closer to replicating my problem / potential solutions (I hope!)
Pete
Re: Map network drive in Explorer - not in XY!
Posted: 05 Sep 2011 18:21
by admin
To me it looks like Windows 7 is keeping the mapped drives info in separate "spaces" (lacking the technically correct term here) instead of globally as in earlier versions.
How WE handles this will probably stay its secret. It would not be the first thing that WE does well but doesn't work as expected when one uses the APIs officially designed for the jobs.
Re: Map network drive in Explorer - not in XY!
Posted: 05 Sep 2011 19:24
by petersboulton
admin wrote:To me it looks like Windows 7 is keeping the mapped drives info in separate "spaces" (lacking the technically correct term here) instead of globally as in earlier versions.
How WE handles this will probably stay its secret. It would not be the first thing that WE does well but doesn't work as expected when one uses the APIs officially designed for the jobs.
I was going to say this was a FUD (Fear-Uncertainty-Doubt) get-out but decided I like XYplorer so much I'd have a go myself! This is my C++ code to launch the MS map network drive dialog from a test application I wrote:
Code: Select all
void CNetworkDriveMapperDlg::OnBnClickedButton1()
{
CString sRemoteName;
NETRESOURCE nr;
memset(&nr,0,sizeof(nr));
nr.lpRemoteName = (LPTSTR)(LPCTSTR)sRemoteName;
nr.dwType = RESOURCETYPE_DISK;
CONNECTDLGSTRUCT c;
memset(&c,0,sizeof(c));
c.cbStructure = sizeof(CONNECTDLGSTRUCT);
c.hwndOwner = m_hWnd;
c.lpConnRes = &nr;
DWORD dwRes = WNetConnectionDialog1(&c);
CString sErr;
sErr.Format("Error = %d",dwRes);
AfxMessageBox(sErr);
}
I appear to get the same results from this code as you do from your XYplorer code - as in, create mapping from admin mode -> doesn't appear in User Mode.

Therefore, unless there are workarounds / different apis I haven't found I regrettably have to agree with you!
It's a shame that XYplorer cannot work the same in this respect as Windows Explorer but it seems we will all just have to live with it!
All the best,
Pete
Re: Map network drive in Explorer - not in XY!
Posted: 05 Sep 2011 20:19
by petersboulton
This is positively my LAST post on this subject!
I believe the full explanation for what we see in XYplorer can be found here:
http://support.microsoft.com/kb/937624
Seems to me, also, that the way WE works may be construed as 'unsafe' according to Microsoft's strict definition in that it exposes a network drive created in Admin (elevated) to processes in User.
In other words, XYplorer actually does it 'right' and WE does it 'wrong'!
The end.
Pete
Re: Map network drive in Explorer - not in XY!
Posted: 05 Sep 2011 21:06
by admin
Thank you. It's hard to imagine a better end for an unfixed bug story than to prove that the bug is actually the right way.

Re: Map network drive in Explorer - not in XY!
Posted: 29 Nov 2024 17:43
by aevans0001
Just to note. Not sure if this is the same issue. I created a mapped drive on WE in regular user mode and it would not show up in XY. I tried manual refreshing etc. I could never get those mappings to show up correctly. Howevver, if I remade the mappings using XY tand then did a manual tree refresh, i can now see them in both XY and WE.
Thanks!