Jump to content
Sign in to follow this  
stev379

Unable to execute external program

Recommended Posts

Why would this give an "Unable to execute external program" error:

FileInstall ("ChglclAdmPW.vbs", @systemdir)

Run(@Systemdir & "\ChglclAdmPW.vbs", @systemdir)

FileDelete(@systemdir & "\ChglclAdmPW.vbs")

Thanks!!

Share this post


Link to post
Share on other sites

Why would this give an "Unable to execute external program" error:

FileInstall ("ChglclAdmPW.vbs", @systemdir)

Run(@Systemdir & "\ChglclAdmPW.vbs", @systemdir)

FileDelete(@systemdir & "\ChglclAdmPW.vbs")

Thanks!!

<{POST_SNAPBACK}>

Did you try this?

Run(@Systemdir & "\ChglclAdmPW.vbs")

Just wondering why your asking for @Systemdir again.

EDIT: Also on the FileInstall out of the Help File:

source: The source path of the file to compile. This must be a literal string; it cannot be a variable.

Edited by ronsrules

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Tried that. Asked for @systemdir again as a working directory.

Thanks!

Did you try this?

Run(@Systemdir & "\ChglclAdmPW.vbs")

Just wondering why your asking for @Systemdir again.

EDIT:  Also on the FileInstall out of the Help File:

source:  The source path of the file to compile. This must be a literal string; it cannot be a variable.

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites

This is what I meant:

FileInstall("C:\test.au3", "D:\mydir\test.au3")

Literal String being "C:\" as the example presents.

Sorry for not being clearer.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

No problem! Thanks for the help.

I figured it out. I knew I had run in to this before. You have to open wscript.exe.

Runwait(@comspec & " /c Wscript.exe " & @Systemdir & "\ChglclAdmPW.vbs", @SystemDir, @SW_HIDE)

This is what I meant:

FileInstall("C:\test.au3", "D:\mydir\test.au3")

Literal String being "C:\" as the example presents.

Sorry for not being clearer.

<{POST_SNAPBACK}>

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...