> Hi!
>
[quoted text clipped - 13 lines]
> Thanks and greetings,
> Christian.
A Google search of "WSH Logon script" returned:
WSH Logon Scripts
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=4760&pg=1
> I have a batch-file (*.bat) which logon the client to our server, including
> printer and drive mappings.
[quoted text clipped - 8 lines]
> Is it possible, to write such a script? Or does the WSH not support this
> feature?
Hi
In VBScript, you can use InputBox to ask for username and password,
and MapNetworkDrive to map a network drive supplying username and
password if needed.
Note that you can pick up the current user name like this:
Set objWshNet = CreateObject("WScript.Network")
strCurrentLoggedInUser = objWshNet.UserName
WScript.Echo strCurrentLoggedInUser
You can also from your vbscript use the Internet Explorer object
to ask for and mask password input, take a look here:
http://groups.google.com/groups?selm=3EB7E661.7D857459%40hydro.com
The script in the link above requires IE 5.5+, if you want the script
to work on IE 5.01 as well, remove the following two lines (this will
re-enable right-click menu on the dialog):
& " onContextmenu='window.event.cancelbubble=true" _
& ":window.event.returnvalue=false'" _
If you have Win98 or WinME computers, this might be relevant for the
PasswordBox routine in the link above:
http://groups.google.com/groups?threadm=e3496be5.0309162049.6c28474e%40posting.g
oogle.com
WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp

Signature
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
Christian-Josef Schrattenthaler - 27 Jul 2004 16:29 GMT
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> schrieb im
Newsbeitrag news:OEQ4Pp9cEHA.1692@tk2msftngp13.phx.gbl...
> In VBScript, you can use InputBox to ask for username and password,
> and MapNetworkDrive to map a network drive supplying username and
> password if needed.
I know InputBox, but I can only ask for one. It is not possible to create a
windows which asks for the username and the password. Or do you have a hint,
how this works?
Greetings,
Christian.
Torgeir Bakken \(MVP\) - 27 Jul 2004 16:40 GMT
> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> schrieb im
> Newsbeitrag news:OEQ4Pp9cEHA.1692@tk2msftngp13.phx.gbl...
[quoted text clipped - 6 lines]
> windows which asks for the username and the password. Or do you have a hint,
> how this works?
Hi
Did you take a look at the other link I gave you? You can use the
Internet Explorer object to do this (as the script in the link in
my other post in this thread do).

Signature
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
Welman Jordan - 28 Jul 2004 01:42 GMT
> > "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> schrieb im
> > Newsbeitrag news:OEQ4Pp9cEHA.1692@tk2msftngp13.phx.gbl...
[quoted text clipped - 11 lines]
> Internet Explorer object to do this (as the script in the link in
> my other post in this thread do).
And another approach is to use HTML application (HTA).
Jared - 01 Aug 2004 02:15 GMT
Pardon me, but, am I missing something? Your users have just authenticated
to your domain, and now, you want them to supply their credentials all over
again just to map their drives and printers? In my opinion this should be
transparent to the end user. You can use WSH to get the username of the
currently logged on user, use that to map as desired. I would hate to work
in your company, logging in twice???
>> > "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> schrieb im
>> > Newsbeitrag news:OEQ4Pp9cEHA.1692@tk2msftngp13.phx.gbl...
[quoted text clipped - 15 lines]
>
> And another approach is to use HTML application (HTA).