I tried that and it works great. Thanks for the tip.

Andy L. Mayfield 
Sr. System Operation Specialist 
Alabama Power Company 
Office: 205-226-1805 
Cell: 205-288-9140 
SoLinc: 10*19140 

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of LJ LongWing (Head)
Sent: Thursday, December 06, 2007 1:14 PM
To: [email protected]
Subject: Re: Help running batch file from AL

 

%ComSpec% /c cd /d S:\Workgroups\APC\Subs\RTU-SCADA\LineSCADA\Line
Group\PA Assistant\Support Files&&"Update PA Assistant.bat" 

 

That should also work then...I added a /d to the CD which tells it to
also change the drive, and then removed your &&S:

 

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mayfield, Andy L.
Sent: Thursday, December 06, 2007 11:40 AM
To: [email protected]
Subject: Re: Help running batch file from AL

** 

Thanks Fred. I finally got it to work. This is what I had to do:

 %ComSpec% /c cd S:\Workgroups\APC\Subs\RTU-SCADA\LineSCADA\Line
Group\PA Assistant\Support Files&&S:&&"Update PA Assistant.bat" 

The C:\ path I was using in my example was for testing. I didn't want to
have to deal with the real path while testing since its so long.

Thanks again!!

Andy L. Mayfield 

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Grooms, Frederick W
Sent: Thursday, December 06, 2007 11:39 AM
To: [email protected]
Subject: Re: Help running batch file from AL

 

Another option if you don't want to (or can't) modify your batch file is
to do multiple commands in the Run Process action.  For Windows the
separator is && (in a CMD window do help cmd for more info).

 

i.e.    %ComSpec% /c "cd \&&C:\Update PA Assistant.bat "

Will change to the root directory before executing the Update PA
Assistant.bat file.

 

Fred

 

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Grooms, Frederick W
Sent: Thursday, December 06, 2007 11:16 AM
To: [email protected]
Subject: Re: Help running batch file from AL

** 

When you do a RunProcess in an Active Link the User tool starts the
shell in the "c:\program files\arsystem\user" (Or wherever the User tool
is started from).  If RoboCopy is not in the PC's path then you will
have to specify it's full path or change to the folder where it resides
inside the batch file.

 

Yes %ComSpec% is cmd.exe.  It just eliminates the need to have it in the
path or specify the full path.  It also eliminates the need to know if
it is CMD.exe or some other shell program (in case M$ or some security
dude decides to changes it's name).

 

Fred

__20060125_______________________This posting was submitted with HTML in
it___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to