Monday 1 October 2018

windows - Vbscript for autologin

I have retrieved a VBscript that may have worked in other scenarios to auto login windows ran by a task scheduler when windows is logged off by automating the logon process like a normal user would do on windows 10. IE: user arrives to a computer, presses enter for the login screen to appear, types in username, presses tab and enters password and clicks enter and the user logs in.


here is the script :



set wshShell = CreateObject("WSCript.shell")


wshShell.sendkeys "{ENTER}"


wscript.sleep 5000


wshShell.sendkeys "Username"


wscript.sleep 5000


wshShell.sendkeys "{Tab}"


wscript.sleep 5000


wshShell.sendkeys "Password"


wscript.sleep 5000


wshShell.sendkeys "{ENTER}"


WScript.Quit



now the code works find if i run it from a logged on user in windows, it presses enter types the username presses tab type password and presses enter, but when i create a task to run, nothing happens and if i look at the history of the task it says that the process ran successfully which means there was no errors.


I have tried to convert it to EXE still same results any help or fix would be appreciated,


Thank you.

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...