Sign in to follow this  
Followers 0
HockeyFan

Please Help!

5 posts in this topic

:)

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!


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                        





(adsbygoogle = window.adsbygoogle || []).push({});




                    
                
                    
                    
                    






    
    
        
w0uter   

    
        
    
             1
    
        
    

        
            
                 resreveR nA
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             1
    
        
    

                2,204 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #2 · 
            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

Share this post


Link to post
Share on other sites

:">

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

Share this post


Link to post
Share on other sites

:">

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 *

Share this post


Link to post
Share on other sites

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.

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