Sign in to follow this  
Followers 0
Gllopc

RunWait errors with "Unable to execute the external program"

8 posts in this topic

Hello, I'm having an odd error which I think is associated with how I'm calling the compiled AutoIT script:

INTENTION:

Using AutoIT, I'm attempting to remove wireless networking software (Intel PROSet) from a notebook, using an AutoIT compiled executable that resides on a server, which is being called from the notebook using it's current wireless connection

INFORMATION:

The notebook has a wired NIC, and as wireless NIC

When a CAT5 cable is plugged in it works flawlessly

The AutoIT script copies down the installation files for a new version of the wireless software, uninstalls the current wireless client, and then calls the SETUP.EXE (or a VBS file that does the same) of the new wireless software

CODE THAT ERRORS OUT:

RunWait(@Comspec & " /C c:\options\intel_9010\smscert-standard-profiles.vbs", "", @SW_HIDE)

RESULT:

With the CAT5 cable in unplugged, and working wirelessly, the AutoIT script fails with "Error: Unable to execute the external program. The directory name is invalid", when calling an external .VBS or .EXE file installed locally on the notebook.

QUESTION:

How do I get the AutoIT script, which is being run over the wireless connection which is eventually broken, to call the local VBS or EXE file without creating the error?

I suppose it's obvious that this has something to do with network connectivity as it works perfectly when the wired NIC is plugged in; however, I don't have a choice as this program has to be able to run on a wireless connected notebook.

Any help is much appreciated!

Share this post


Link to post
Share on other sites



Perhaps you could check if the file exists before trying to run it.

Share this post


Link to post
Share on other sites

Perhaps you could check if the file exists before trying to run it.

Well, I know the file exists because I can see it locally sitting in the folder.

Perhaps looking for it first, though, will create an error that might yield more information.

Share this post


Link to post
Share on other sites

I'll give that a try right now. I don't believe it will make a difference as the originally posted code works fine with the network cable is plugged in.

I'll report back momentarily.

Try:

RunWait(@Comspec & " /C wscript c:\options\intel_9010\smscert-standard-profiles.vbs", "", @SW_HIDE)

Share this post


Link to post
Share on other sites

I'll give that a try right now. I don't believe it will make a difference as the originally posted code works fine with the network cable is plugged in.

I'll report back momentarily.

When it doesn't work you could also try to specify an existing working dir ... something like:

RunWait(@Comspec & " /C wscript c:\options\intel_9010\smscert-standard-profiles.vbs", @TempDir, @SW_HIDE)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

When it doesn't work you could also try to specify an existing working dir ... something like:
RunWait(@Comspec & " /C wscript c:\options\intel_9010\smscert-standard-profiles.vbs", @TempDir, @SW_HIDE)oÝ÷ Ûú®¢×«]Ø­;'¯k"!jש®åzk%G­«há,¥ç"jYr²)ÜzØ^r^Á«+mºw^®l§¢Çç(uâv¥+¬yܱ«­¢+ÙIÕ¹]¥Ð¡
½µÍÁµÀìÌäì½èÀäÈí½ÁÑ¥½¹ÌÀäÈí¥¹Ñ±|äÀÄÀÀäÈí͵ÍÉеÍѹɵÁɽ¥±Ì¹ÙÌÌäì°ÀÌØíQ55QµÁ¥ÈµÀìÅÕ½ÐìÀäÈí¥¹Ñ±|äÀÄÀÅÕ½Ðì°M]}!%¤

Where $TMMTempDir was previously defined as "c:\options"

Thanks!

Share this post


Link to post
Share on other sites

That did it. Oye vay - I hate problems like that one. Especially since the code was right under my nose.

This is an difficult one to figure out till you understand why it fails.

In your case I guess the original workdir was disconnected which made the run command fail due to the unavailability of the workdirectory.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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