?
Solved

Unable to run Bat file from sccm 2012 task sequence

Posted on 2014-08-28
1
Medium Priority
?
1,727 Views
Last Modified: 2014-09-04
I have a bat file that consist of these lines:

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

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?
0
Comment
Question by:rdefino
1 Comment
 
LVL 19

Accepted Solution

by:
Mike T earned 2000 total points
ID: 40294707
Hi,

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.

Mike
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question