vbscript - Script not working on windows 7 -


i working on vbscript activates application, sends password application , minimizes application. script fails sending keys. application not password, when double-click on script receives password , minimizes. don't know error is.

it's called this:

initliszeusb.bat:

pause start %mydrive%"runsandisksecureaccess_win.exe"  pushd %~dp0 ping 10.10.10.10 -n 1 -w 10000 >nul start /b "" cscript "d:\min.vbs" 

min.vbs:

option explicit dim oshl : set oshl = createobject("wscript.shell") oshl.appactivate "sandisk secureaccess" oshl.sendkeys "pass1_word~" 'enters password wscript.sleep(3000) oshl.sendkeys "% n" 'minimises window wscript.quit 

in windows 7, experienced issues when using sendkeys send keys other apps (the way do), when sendkeys not running in elevated process. macro/script works 100%, looks keystrokes getting lost. way around found running sender application (or script) elevated (i.e. "as administrator").


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -