How do I run a batch file from the command line in a package in SCCM 2007?

I have created a package and program to run a batch file that stops processes, deletes files and copies new files - part of software configuration changes.  I have run it several times and it gets to the client and copies to the client and then shows that it is running for several hours and then I receive a "Program failed (runtime exceeded)" error in the advertisement status.  If I look in the execmgr.log it points to the program running past its maximum runtime.  What gives?  What do I have to put in the command line other than the name of my batch file?  I know it runs as I have tested it many times.  Please help! I have re-run this package 6 times.
FBlandAsked:
Who is Participating?
 
JonLambertConnect With a Mentor Commented:
Start the package command line with "CMD /C"  e.g. CMD /C MYBATCH.BAT
0
 
Adam LeinssCommented:
Might help to see the actual batch file.
If it's trying to use network shares and you are running it as administrator, that's probably not going to work.  You can only use network shares if it is "Run as user" because when you run it as administrator, it runs it as LOCALSYSTEM which does not have access to network resources.
1
 
FBlandAuthor Commented:
YOU ARE MY HERO!!!  I looked everywhere online and couldn't find that one peice of info to make the package run.  I tried your advice this morning and it works!!!  I am soooooo thankful!  This is the best website!
0
All Courses

From novice to tech pro — start learning today.