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. 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 Grooms, Frederick W Sent: Thursday, December 06, 2007 10:30 AM To: [email protected] Subject: Re: Help running batch file from AL Try the following %ComSpec% /c C:\Update PA Assistant.bat As long as Robocopy is in the path of the PC it should work. Fred ________________________________ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Mayfield, Andy L. Sent: Thursday, December 06, 2007 10:22 AM To: [email protected] Subject: Re: Help running batch file from AL ** Thanks for the advice. I think this is the right track, but I am having difficulty getting it to work. Right now my command line for the Run Process actions looks like this : C:\Update PA Assistant.bat There is a copy of Robocopy.exe the same directory, but it appears that it runs it from the "C:\Program Files\AR System\User" directory and is not seeing Robocopy.exe. It will work if I place Robocopy.exe in the "C:\Program Files\AR System\User" directory. Is there a different syntax I should use in my Run Process statement that would have it run f, or do I need to add something to the batch file itself? Thanks, 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 Hugo Visser Sent: Thursday, December 06, 2007 8:11 AM To: [email protected] Subject: Re: Help running batch file from AL ** You should change your batch file to include a "change directory" statement. One of my favorite windows batchfile tricks is using "cd /d %~dp0" which will change to the directory where the batch file is located and also change the drive. This only works when using " cmd.exe" so the client should be something like windows 2000 or newer. Hope this helps, Hugo On Dec 6, 2007 2:55 PM, Mayfield, Andy L. < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: I am trying to run a batch file via the Run Process action on an active link. The active link is firing and it's attempting to run the batch file, but not successfully. A copy of Robocopy.exe has to be in the same directory as my batch file. I was wondering if executing via an active link renders it unable to read the Robocopy.exe file for some reason. It works fine if you simply execute it manually from the folder, but when executed via the active link it behaves as if Robocopy.exe was not in the folder. Sorry is this is a duplicate post. I tried to post from the web last night, but did not see it on the list. Andy L. Mayfield Sr. System Operation Specialist Alabama Power Company Office: 205-226-1805 Cell: 205-288-9140 SoLinc: 10*19140 ________________________________________________________________________ _______ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" __20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___ __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"

