Re: Win32_NetworkConnection closes connectios in remote monitoring?
- From: Gerry Hickman <gerry666uk@xxxxxxxxxxxxxxxx>
- Date: Fri, 16 May 2008 23:48:50 +0100
Hi,
My guess is that it's related to whether or not the logon session has loaded a profile or not? There's a big difference between impersonating a domain\account and actually logging on as a domain\account. Check the mapped drives section of the HKCU registry hive in each case.
There's also a difference between hacking into a session that's already established and creating a new one. In terminal services you can hack into an existing session by using /console in XP / VistaRTM or /admin in Vista SP1. If you hack into an existing session, you WILL see the mapped drives.
I'd suggest changing the design of the app.
A more interesting question is this. How can you create a new session to a resource on a remote machine (and pass credentials) using pure WMI? e.g. not shell'ing out to CMD.
Jialiang Ge [MSFT] wrote:
Hello Tango
I've reproduced the issue on my side that the mapped driver shows "Unavailable" status when it's queried from a remote computer with the Win32_NetworkConnection class. Below are my repro-steps:
1. In "computer 2", use "net use" command to create a mapped driver to "computer 3" with credential 1 (domain username & password).
2. In "computer 2", query the local mapped drivers' status with wbemtest, and it returns the "OK" status for the newly created mapped driver.
3. In "computer 1", use wbemtest to connect to "computer 2" (\\computer2\root\cimv2) with credential 1 (the same as step 1), and query Win32_NetworkConnection.Status. It returns "Unavailable" though the mapped driver is operational in "computer 2".
This test can be reproduced in any OS versions (e.g. Windows XP, 2003, Vista).
Based on my analysis, we cannot query the mapped driver's status because there are 2 credentials (though the same domain username and password) in the query path:
Computer 1 -> 1. query with Win32_NetworkConnection -> Computer 2 -> 2. map driver with net use -> Computer 3
1. query with Win32_NetworkConnection: needs credential (domain username and pwd)
2. map driver with net use: also needs credential (domain username and pwd)
Even if the two uses the same domain username and password, the part 2 rejects the query due to some security issues.
Please give me some time so that I can confirm the analysis with the product team and see whether I can find out any workarounds or not. I will get back to you as soon as possible. Thanks for your patience.
Regards,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--
Gerry Hickman (London UK)
.
- Follow-Ups:
- Re: Win32_NetworkConnection closes connectios in remote monitoring?
- From: Jialiang Ge [MSFT]
- Re: Win32_NetworkConnection closes connectios in remote monitoring?
- References:
- Win32_NetworkConnection closes connectios in remote monitoring?
- From: Tango
- RE: Win32_NetworkConnection closes connectios in remote monitoring?
- From: Tango
- RE: Win32_NetworkConnection closes connectios in remote monitoring?
- From: Jialiang Ge [MSFT]
- Win32_NetworkConnection closes connectios in remote monitoring?
- Prev by Date: RE: Win32_NetworkConnection closes connectios in remote monitoring?
- Next by Date: Re: Win32_UTCTime class on Windows 2000
- Previous by thread: RE: Win32_NetworkConnection closes connectios in remote monitoring?
- Next by thread: Re: Win32_NetworkConnection closes connectios in remote monitoring?
- Index(es):
Relevant Pages
|