Jump to content

unable to execute the external program


jguy
 Share

Recommended Posts

I am attempting to use AutoIT to install an update. I have created a self extracting zip file that when it unzips the file on the remote computer it installs the application and answers the questions.

I am pushing the self extracting zip file to a network computer using Languard Security Scanner to deploy the custom application. The program will copy to the network computer, unzip the file in the appropriate directory and kick off the AutoIT executable. I then get the following error.

AutoIT Error

Unable to execute the external command

Access denied

I can execute the AutoIT executable on the remote computer from the files I sent to it through self extracting zip file as a standard user with no admin rights.

I am using the RunAsSet to execute the program as an administrator and again one the program is on the remote computer I can execute the program without any errors.

Any Suggestions? Below is a copy of the code I am using.

RunAsSet("AdminUserName", @Computername, "Password")

Run("c:\temp\install_flash_player_active_x.exe")

WinWaitActive("Adobe Flash Player 9")

Send("{Enter}")

WinWaitActive("Adobe Flash Player 9")

Send("{Enter}")

RunAsSet()

Link to comment
Share on other sites

The code you are using wont necessarily be able to be used on all computer systems. I think you need to use @TempDir as follows.

RunAsSet("AdminUserName", @Computername, "Password")

Run(@TempDir & "\install_flash_player_active_x.exe")

WinWaitActive("Adobe Flash Player 9")
Send("{Enter}")

WinWaitActive("Adobe Flash Player 9")
Send("{Enter}")

RunAsSet()

Also be sure that when you run the winzip it sends it to the temp directory.

Edit: Removed your quoted post.

I hope that helps,

JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I added the @TempDir command I am still getting the error. Below is the exact text from the error box.

Line 0 (File"C:\WINDOWS\Temp\WZSEO.TMP\InstallFlash.exe"):

Run(@TempDir & "\install_flash_player_active_x.exe")

Error: Unable to execute the external program.

Access is denied.

Link to comment
Share on other sites

I added the @TempDir command I am still getting the error. Below is the exact text from the error box.

Line 0 (File"C:\WINDOWS\Temp\WZSEO.TMP\InstallFlash.exe"):

Run(@TempDir & "\install_flash_player_active_x.exe")

Error: Unable to execute the external program.

Access is denied.

It looks like the file is in the temporary directory and in another folder below that. WZSEO.TMP is another directory. Might want to check that self extracting zip to see exactly where it is putting those files. It looks like it is putting it in the temp directory, and creating a random tmp folder. WZ = WinZip, SE = Self-Extracting, 0 = (I dunno) .TMP = Temp Directory.

That should be about what it is. You may want to check to see if the that folder name is standard or random.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I have tried this several different ways and come up with the same error every time. I can go to the remote computer log in as a testuser with no administrator rights and run the program with no errors.

Link to comment
Share on other sites

This also did not work. I checked the services on the remote computer and I do not see any that would prevent the program from running. I guess it could be a security issue with XP.

Thanks,

John

is the running autoit script on the remote computer.

In the other case the path of the exe file is wrong

Link to comment
Share on other sites

is the running autoit script on the remote computer.

In the other case the path of the exe file is wrong

That is exactly what I have been saying all along. The path is messed up. He even showed that above. It is in WZSEO.TMP folder, and he isnt using that folder.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

The AutoIT script is located on the remote computer. The executable zip file unzips two files on the remote computer, one is the AutoIT file, the other is the Install_Flash.exe. The AutoIT script sets the program to RunAsSet so it is running as the administrator, it then calls the Install_Flash.exe program and then answers the installation questions.

I would not have to use the AutoIT script for this except that some of the programs I would like to push out to our computers do not use any switches for running silent.

Thanks,

Link to comment
Share on other sites

The AutoIT script is located on the remote computer. The executable zip file unzips two files on the remote computer, one is the AutoIT file, the other is the Install_Flash.exe. The AutoIT script sets the program to RunAsSet so it is running as the administrator, it then calls the Install_Flash.exe program and then answers the installation questions.

I would not have to use the AutoIT script for this except that some of the programs I would like to push out to our computers do not use any switches for running silent.

Thanks,

Basically we have all taken shots in the dark, and there is no way we can truly help you any further without the code, and even the zip to see where it is installing the file to. I believe there is a folder issue. You are not in the right directory or something.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Basically we have all taken shots in the dark, and there is no way we can truly help you any further without the code, and even the zip to see where it is installing the file to. I believe there is a folder issue. You are not in the right directory or something.

JS

You are right, the file is trying to run from my local computer instead of on the remote computer. When it does this I do not have the proper rights on the remote computer. Below is my script, I can make the zip file open to any directory when I create it with Win-Zip Self-Extractor. I believe the problem is with the Languard Security Scanner I am using to push the application to the remote computer.

Thank you for your patience

RunAsSet("Administrator", @Computername, "Password")

run(@TempDir & "install_flash_player_active_x.exe", @TempDir)

WinWaitActive("Adobe Flash Player 9")

Send("{Enter}")

WinWaitActive("Adobe Flash Player 9")

Send("{Enter}")

RunAsSet()

Link to comment
Share on other sites

If these PCs are all on a network, and you have a server, then use NET USE to map a drive, and run the program from there. It would keep it simple. Also, have it so once it runs, it places a flag file (*.flg) in a folder on the pc that the software is being installed on. This way when the user logs in again, it will not try to install again. You can use this process for just about anything you want to install for over a network.

Edited by vollyman
Link to comment
Share on other sites

PSEXEC.exe may be a better option for "pushing" files through the internet.

http://www.sysinternals.com/Utilities/PsExec.html

That should help you out.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...