elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


  Mostrar Mensajes
Páginas: [1]
1  Programación / .NET (C#, VB.NET, ASP) / Problema de ejecucion de .bat y de scripts en: 17 Noviembre 2015, 18:06 pm
Hola,

Tengo un problema quiero ejecutar un script VBS que abre puertos en un modem:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "telnet 192.168.1.254", 9
WScript.Sleep 500
WshShell.SendKeys "TELMEX"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 500
WshShell.SendKeys "0F15AF5A01"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 500
WshShell.SendKeys "wireless ifconfig state=enabled"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 500
WshShell.SendKeys "saveall"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 500
WshShell.SendKeys "exit"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 500
WshShell.SendKeys "Timeout 15"
WshShell.SendKeys "{ENTER}"

Esto lo hago a traves de un archivo .bat

cscript "Modem.vbs"

Timeout 20

y lo llamo en visual con

Dim psi As New ProcessStartInfo("Modem.bat")
psi.WorkingDirectory = "J:\Sourcesafe 2\Sentinel SMI\SentinelSMIManager\SYS_PR_SentinelSMIManager.C V\bin\Debug\ScriptsSentinelSMI"
psi.WindowStyle = ProcessWindowStyle.Maximized
Process.Start(psi)

el problema es que me sale que no encuentra el archivo especificado dentro del bat, ya intente poniendo la ruta completa del script y aun así no funciona ya probé mi script desde cmd con cscript y funciona bien, tambien ya probé dando doble click en mi archivo bat y funciona bien el problema solo es en visual no se si alguien sepa a que se debe esto.


Agradezco su tiempo por leer esto y ojala me puedan ayudar
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines