Jump to content

Recommended Posts

Posted

:)

Help!!!!

I have a script that calls an executable that I know exists but I keep getting the following error message:

"Error:Unable to execute external program"

Here is the code that I am using:

$result = FileExists("C:\Program Files\Network Associates\Common Framework\FrmInst.exe")

If $result = 0 Then ;0=failure, does not exist.

MsgBox(64, "McAfee ePolicy Agent", "Installing McAfee ePO Agent software. Please wait....", 5)

RunWait("FramePkg.exe /install=agent", "C:\Software\ePOAgent", @SW_SHOW)

RunWait("cmdagent.exe /p /e /c", "C:\Program Files\Network Associates\Common Framework", @SW_SHOW)

Else

MsgBox(64, "McAfee ePolicy Agent", "Uninstalling McAfee software FrameServices (ePO Agent)." & @CR & "" & @CR & "Please wait...", 5)

RunWait("FrmInst.exe /ForceUninstall", "C:\Program Files\Network Associates\Common Framework", @SW_SHOW)

RunWait("FramePkg.exe /install=agent", "C:\Software\ePOAgent", @SW_SHOW)

RunWait("cmdagent.exe /p /e /c", "C:\Program Files\Network Associates\Common Framework", @SW_SHOW)

EndIf

Exit

The error is genereated on the line [RunWait("FrmInst.exe /ForceUninstall", "C:\Program Files\Network Associates\Common Framework", @SW_SHOW)]The file does exist so why does it keep failing?   Any help would be much appreicated.Thanks!


            
        

        

        
    

    
    

    

                    
                    
                        
                    
                    
                

                    

                    
                    






    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


w0uter
            
            
                Posted 
                
            
        
    
    
        


w0uter
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 2.2k
                            
                                
                            
                        
                        
                    
                
            
            
                

    
    
        
 resreveR nA
    
    

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
           
           Posted 
           
            
            
                
                
            
        
    

    

    

    
        
        
            AFAIK. working dir isnt the same as the dir it is run from.

try 

RunWait("C:\Program Files\Network Associates\Common Framework\FrmInst.exe /ForceUninstall", "C:\Program Files\Network Associates\Common Framework", @SW_SHOW)

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Posted

:">

Just to add... the error is generated whether the file already exists or not. Am I using the wrong code to call the "FrmIns.exe" or "FramePkg.exe" executables??

Posted

:">

Just to add... the error is generated whether the file already exists or not.  Am I using the wrong code to call the "FrmIns.exe" or "FramePkg.exe" executables??

<{POST_SNAPBACK}>

yes. read post of w0uter.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

That worked!! Thank you.

I guess I am confussed with the syntax referencing "working directory"...but then I'm not a real programmer anyway. Just trying to learn. :)

Regardless...thanks for your help.

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
  • Recently Browsing   0 members

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