Jump to content

Error: Unable to execute the external program


Recommended Posts

Hi All,

I've facing a problem with this script and would appreciate any help or advice here. Please see attached the error message when I run the script.

I've attached a part of my script to this message:

#include <file.au3>
#include <date.au3>

Opt("TrayIconDebug", 0) 

dim $file, $ErrVal, $file1, $WinEx, $Count

; Set the RunAs parameters to use local adminstrator account
RunAsSet("administrator", @Computername, "admin01")

If FileExists("C:\WINNT\Temp\UnAlt-ok.log") = 1 Then
    $ErrVal = FileCopy("C:\WINNT\Temp\UnAlt-ok.log", @AppDataCommonDir)
    If $ErrVal = 0 Then 
        Errorlog("Cannot Copy UnAlt-ok.log")
    EndIf
EndIf   

If FileExists("C:\WINNT\Temp\AlCollection.ini") = 1 Then
    $ErrVal = FileCopy("C:\WINNT\Temp\AlCollection.ini", @AppDataCommonDir)
    If $ErrVal = 0 Then 
        Errorlog("Cannot Copy AlCollection.ini")
    EndIf
EndIf   

If FileExists(@AppDataCommonDir & "\UnAlt-ok.log") = 0 Or FileExists("C:\Program Files\Altiris\Altiris Agent\Client Policies\xxxx.xml") = 1 Then
    
; Run Altiris Cleanup
    If FileExists("C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe") = 1 Then
        $ErrVal = RunWait(chr(34)&"C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe"&chr(34)& " /clean")
        If $ErrVal <> 0 Then
            Errorlog("Error running AexAgentUtil.exe")
            MsgBox(0,"Warning", "Uninstallation Failed ! Please check with IT Helpdesk")
            Exit
        EndIf
    Else
    ;No existing Altiris Client, install new client
        InstallNew()
    EndIf

Thanks in advance.

post-17767-1163042634_thumb.jpg

Link to comment
Share on other sites

Hi,

To avoid errors later you should also check out the AutoIt's directory macros. You find them in the help file autoit->Macro Reference->Directory macros-[@windowsDir|@ProgramFilesDir]

Just a my two cents.:whistle:

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...