Unable to run Bat file from sccm 2012 task sequence

I have a bat file that consist of these lines:

cd C:\Program Files (x86)\PGP Corporation\PGP Desktop
C:\Program Files (x86)\PGP Corporation\PGP Desktop\pgpwde --decrypt --disk 0 --passphrase xxxxxxxxx
ECHO PGP decryption starting

I really don't need the echo's, but would be nice to have them.

I've tried creting a tsk sequence that just runs "C:\Program Files (x86)\PGP Corporation\PGP Desktop\pgpwde" --decrypt --disk 0 --passphrase xxxxxxxxx

But it didn't work. Tried a package, still nothing., Not sure if I'm creating them right.

Any thoughts?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TLeading EngineerCommented:

For 2012, you can only use a package (because it's an EXE not an MSI) or use a task-sequence.
Personally, I would install MDT 2013 and run the integration if you haven't already as it adds lots of extra functionality. This would then allow you to use the MDT framework and run the job with vbscript instead of a batch file.

Using a batch file will work, but is a "fire and forget" method: SCCM has no control other than launching it. It certainly has no idea what your batch file does or what the result it. MDT + vbscript can return a result code (0 means success) and let's SCCM trap errors.

Any script with a pause or other action that displays a prompt will fail as SCCM defaults to run as local system which has no user context and can never display messages etc. The job will fail after the process is killed.

Create a package and make the command line:
pgpwde --decrypt --disk 0 --passphrase xxxxxxxxx

but by sure to add the package source with pgpwde inside. It should work with just a task-sequence and the full path as you've already tried but you would have to provide smsts.log, appenforce.log and maybe ccmexec.log for people to see why it failed. I suspect it's the parameters somehow.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server Apps

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.