Sign in to follow this  
Followers 0
edsager

Unable To Execute External Program

2 posts in this topic

Hello,

I am trying to run Veritas software with AutoIt so that I can simply execute the compiled script at a certain time during each day to automatically backup documents onto a DVD. However, when I use the "Run" command to start the Veritas software, it gives me the error and explanation listed in this Topic Title and Topic description. I have checked and checked and the pathway and file name are both accurate, but the program will not start and the same error comes no matter where I put the executable backup program.

I include the script for your review (please note that the error lists Line 5 as the line error-causing line):

; Nightly Backup to DVD

Opt ("SendKeyDelay", 3000)

Run ("MyCDPro.exe", "C:\Program Files\VERITAS Software\RecordNow DX", @SW_MAXIMIZE)

MsgBox (0, "Auto Process Running", "Backing up Documents onto DVD", 6)

WinWaitActive ("RecordNow DX Properties")

Send ("!D")
Send ("a")
Send ("q")
Send ("Y")

WinWaitActive ("VERITAS RecordNow DX", "Operation completed successfully.")

Send ("{ENTER}")

Run ("NightlyBackup1.pxj", "C:\Documents and Settings\Edward P Sager\My Documents")

WinWaitActive ("VERITAS RecordNow DX - [Job 1 - C:\Documents and Settings\Edward P Sager\My Documents\NightlyBackup1.pxj]")

Send ("{F6}")

WinWaitActive ("VERITAS RecordNow DX", "C:\Documents and Settings\Edward P Sager\My Documents\NightlyBackup1.pxj Completed successfully.")

Send ("{ENTER}")

WinWaitActive ("VERITAS RecordNow DX - [Job 1 - C:\Documents and Settings\Edward P Sager\My Documents\NightlyBackup1.pxj]")

Send ("!F")
Send ("x")
Send ("{ENTER}")

Any suggestions would be greatly appreciated.

Thanks,

Edward

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

instead of

Run ("MyCDPro.exe", "C:\Program Files\VERITAS Software\RecordNow DX", @SW_MAXIMIZE)

it should be

Run ("C:\Program Files\VERITAS Software\RecordNow DX\MyCDPro.exe", "C:\Program Files\VERITAS Software\RecordNow DX", @SW_MAXIMIZE)

and for

Run ("NightlyBackup1.pxj", "C:\Documents and Settings\Edward P Sager\My Documents")

use

$shortname=FileGetShortName ( "C:\Documents and Settings\Edward P Sager\My Documents\NightlyBackup1.pxj" )

Run(@ComSpec&" /c start "&$shortname,"",@SW_HIDE )

-rathore

Edited by rathore

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