%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

 

  _____  

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

** 

I seem to get the same result. Again, it will run if I have a copy of
Robocopy.exe in the "c:\program files\arsystem\user" folder, but does not if
I remove it.

 

Isn't using %COMSPEC% /c the same as using cmd.exe /c? 

 

Somehow Remedy is running the file as if it resides in the "C:\program
files\arsystem\user" folder.

 ___ 

__20060125_______________________This posting was submitted with HTML in
it___ __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