Sign in to follow this  
Followers 0

Problem Running VBS Script

3 posts in this topic


I've been working with autoit for a while now- and it has resulted in a program that now approaches 5000 lines.

It is proving very valuable and time saving - so thank you to all that have made this possible.

I am running XP pro.

now for the strange part.

On my computer this works:

$tpid = Run(@comspec & " /c cscript.exe " & $tsource & $tVBStype,@TempDir,@SW_HIDE) ; command line script interpreter

msgbox(64,"test","pid :" &$tpid & @lf & "@error :" & @error)

the msgbox is just for testing - as it says- it gives a pid value - as well as 0 for the error.

The path and the file is addressed correctly.

While on another computer I end up having to double click the vbs file to make it run.

I've tested using cscript, wscript, no reference, @tempdir, no work dir, @sw_hide and no @sw_hide.

same thing.

all computers are running the latest release of autoitscript

I've added sleep sentences - verifying code segments to make sure all files are created - and no luck.

Is there something else in XP that I need to think about?

Any ideas how to get around this?


and the strange thing is-- it worked up until a few revisions back - when I added the progress handling that I found in this forum.

any and all ideas are appreciated.

Share this post

Link to post
Share on other sites

Quickest way to troubleshoot would be this:

$cmd = @comspec & " /c cscript.exe " & $tsource & $tVBStype
and then paste the command into a dos window. See what happens. Also, some anti-virus programs prevent executing programs from the temp dir.

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*][/list][/font]

Share this post

Link to post
Share on other sites


thanks for the input.

I've tested in on my own computer to see - and it behaves as I expected.

In a few hours I'll have the test run on the machines that fail- perhaps it will give me a response that allows me to dig deeper for the error.

Has anyone else experienced this on/off behaviour with regards to using Run and @comspec?

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0