shell - How Can i open an cmd prompt and set an path to open an .bat file in Vb Script..? -
i need automate whole process, cmd prompt opens , path set there .bat file open have tried window shell commands .. work fine .. need other way open , set path run file ..can me
thanks in advance
here go
set wshshell = wscript.createobject("wscript.shell") wshshell.run "cmd" wscript.sleep 100 wshshell.appactivate "c:\windows\system32\cmd.exe" wscript.sleep 100 wshshell.sendkeys "c:\path" wshshell.sendkeys "{enter}" wshshell.sendkeys "set path=%path%;c:\tmp" wshshell.sendkeys "{enter}" wshshell.sendkeys "batch.cmd" wshshell.sendkeys "{enter}"
Comments
Post a Comment