Unable to run Bat file from sccm 2012 task sequence

rdefino used Ask the Experts™
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?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Leading Engineer

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.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial