Re: Automatically Login to a Domain
- From: "John Spaith [MS]" <jspaith@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Jun 2006 10:12:14 -0700
Oh, I see. In your initial code post you haev this:
// setup the remote name which will be my domain name e.g. MYDOMAIN
tNetworkRes.lpRemoteName = ptLanInfo->domain;
This is not supported, as you noticed in your post you have to explicitly
ask for a machine name and tell WNetAddConnection3() to connect a share at a
time & you have to re-pass in the credentials each time. You can't get a
one-stop shopping by just passing in the credentials one time and having the
filesys redirector remember them for everything on the same domain.
You could use the credential manager in order to store passwords/user names
more securely, so your app would get at the creds via the Cred mgr API and
then pass them directly to the WNet* stuff. But I think (not sure) it uses
the hive registry so it would get blasted on an update. CredMan docs (or
another newsgroup post with a new thread) could help solve that up.
--
John Spaith
Development Lead, Windows CE
Microsoft Corporation
Check out the CE Networking Team Blog at http://blogs.msdn.com/cenet/.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2006 Microsoft Corporation. All rights
reserved.
"ringwood" <ringwood@xxxxxxxxxxxxx> wrote in message
news:emCD0QVhGHA.3588@xxxxxxxxxxxxxxxxxxxxxxx
Hello John,
thanks for the quick reply. I think we're on about two slightly different
things here.
I think you are refering to the ability to show a windows style login
dialog at startup which would then setup a particular user profile
(including shares). Fortunately (as it isn't possible) this is not what we
wish to do.
Instead we want to programatically log our device onto a domain so we can
access network resources (specifically file and print servers) without any
intervention required by the user. Effectively we want to automate the
functionality implemented by the Network ID tab page on the Owner
Properties dialog accessed from Control Panel. This is mainly because our
device has a single dedicated purpose and thus only runs a single
application (with its own style for dialogs and everything else) which has
hidden the entire CE desktop and its dialogs from the user. This gives us
some of the problems listed below:
* The user cannot gain access to the Owner Properties dialog using
Control Panel.
* We could display the Owner Properties dialog ourselves but it is not
in keeping with the style we have implemented on our device - it is not
possible to tell our device is running CE at all.
* We do not necessarily want users at the device to have knowledge of
the domain password/username. Instead they can load a setup file which
already includes this information.
* Our device allows firmware upgrades (including the OS) which can
result in the hived registry being destroyed. This would require a user to
log back into the domain after firmware upgrades.
Many Thanks
Roger
.
- References:
- Re: Automatically Login to a Domain
- From: ringwood
- Re: Automatically Login to a Domain
- Prev by Date: Re: 4.1ce 4.2ce
- Next by Date: Re: Save/Load dialog doesn't show up on Compact Framework
- Previous by thread: Re: Automatically Login to a Domain
- Next by thread: Re: Automatically Login to a Domain
- Index(es):
Relevant Pages
|