the password can be like this
oShell.Sendkeys chr(34) & password & chr(34)
Steynsk
ASKER
Thanks for your kind response. I've added the changes but It does not close the script.
If I enter the password it flashes very quicky a screen and then asks for the username again. So it does not finish the script but re-runs it.
WScript.Sleep 200
to
WScript.Sleep 1000 or 2000