batch file - Get a VBScript to run properly while my computer is locked -


i put pause code break down , make sure doing supposed do. not.

the check1.msl spit out file named check.rpt. when run manually , batch file pauses - check.rpt there. schedule task , lock computer. when log in, msl program open , cmd prompt sitting @ pause there no check.rpt file.

here have @ beginning:

@echo off pushd "%~dp0"  echo cd %cd%  ping 1.1.1.1 -w 2000 -n 1 echo starting check1 msl file dir check1.msl start check1.msl  ping 1.1.1.1 -w 2000 -n 1 echo starting password injector file wscript //b passwordinjector.vbs  pause popd exit 

here vbscript called passwordinjector.vbs

set wshshell = wscript.createobject("wscript.shell") wshshell.appactivate "user login" wshshell.sendkeys "username" wshshell.sendkeys "{tab}password" wshshell.sendkeys "{tab}{enter}" 

i've tried cscript passwordinjector.vbs no avail.

edit:

researching (and common sense) figured out can't .sendkeys while computer locked. need alternative way pass log in information program. how pass username , password prompt program?

how can pass login information program depends on how particular program expects login information. unless you're able present credentials in commandline or similar (like http post request instance) can't done vbscript i'm afraid.

you may want consider switching more suitable gui automation, autoit.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -