loudguitar76 Posted October 25, 2005 Share Posted October 25, 2005 I am trying to run a vbscript from inside one of my AutoIt .exe's but it wont seem to actually run the .vbs file. Need some help. here is the line i am tyring to use. RunWait(@SystemDir & "\wscript.exe " & "c:\tstools\PIHKR1.vbs") What am i doing wrong? Thanks Link to comment Share on other sites More sharing options...
Josbe Posted October 25, 2005 Share Posted October 25, 2005 I am trying to run a vbscript from inside one of my AutoIt .exe's but it wont seem to actually run the .vbs file. Need some help.here is the line i am tyring to use.RunWait(@SystemDir & "\wscript.exe " & "c:\tstools\PIHKR1.vbs")What am i doing wrong?ThanksThe vbscript isn't executed? AutoIt display a msgbox error? AutoIt script stay in the background? AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
BigDod Posted October 25, 2005 Share Posted October 25, 2005 Should the command line not be RunWait(@SystemDir & "\wscript.exe c:\tstools\PIHKR1.vbs") I could be very wrong. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
loudguitar76 Posted October 25, 2005 Author Share Posted October 25, 2005 The vbscript isn't executed? AutoIt display a msgbox error? AutoIt script stay in the background?No thats the thing it doesnt pass any error messages, it does everything else it is supposed to do except run the script. Link to comment Share on other sites More sharing options...
loudguitar76 Posted October 25, 2005 Author Share Posted October 25, 2005 Should the command line not beRunWait(@SystemDir & "\wscript.exe c:\tstools\PIHKR1.vbs")I could be very wrong.I will try that and see if that works...Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted October 25, 2005 Developers Share Posted October 25, 2005 (edited) Try: RunWait(@Comspec & " /c cscript.exe c:\tstools\PIHKR1.vbs") or to keep the command prompt open: RunWait(@Comspec & " /k cscript.exe c:\tstools\PIHKR1.vbs") Edited October 25, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
loudguitar76 Posted October 25, 2005 Author Share Posted October 25, 2005 Try:RunWait(@Comspec & " /c cscript.exe c:\tstools\PIHKR1.vbs")or to keep the command prompt open:RunWait(@Comspec & " /k cscript.exe c:\tstools\PIHKR1.vbs")Well it opens up dos and changes to the tstools dir but it still doesnt try and run the script? I verified that the script is there.THanks Link to comment Share on other sites More sharing options...
BigDod Posted October 25, 2005 Share Posted October 25, 2005 You could try Send("#r") Send(@SystemDir & "\wscript.exe c:\tstools\PIHKR1.vbs") Send("{ENTER}") Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
ReFran Posted October 25, 2005 Share Posted October 25, 2005 Mmmh ... ... I don't understand where the problem is. If you want to use CMD you have to use for windows programms the "start" option, like: RunWait(@Comspec & " /c start wscript.exe c:\Test.vbs") If you simple want ot run it, use RunWait("WScript.exe C:\OrRepOp.vbs") That should do it. HTH, Reinhard Link to comment Share on other sites More sharing options...
ReFran Posted October 25, 2005 Share Posted October 25, 2005 Ok, another more creative option: $oWSH = ObjCreate("Wscript.Shell") $oWSH.run("C:\Test.vbs",1,TRUE) Best regards, Reinhard Link to comment Share on other sites More sharing options...
loudguitar76 Posted October 25, 2005 Author Share Posted October 25, 2005 Thanks everybody i will try all your suggestions tonight and hopefully poist in the am that it works Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now