That set me on the right path to figuring this out. The dailyreboot.bat file wasn't in there. A different file was. I had copied an earlier application, and just changed a few fields, because they were so similar (the one copied from was working fine, but would never work with this different collection). Even after I saw the wrong file in the ccmcache, I can go back and verify all the settings are completely different, and look correct, yet the app copied from had hung up in there somehow. I deleted it, redid the whole thing, and now it executes just fine. So lesson learned there. Thanks so much guys!
From: [email protected] [mailto:[email protected]] On Behalf Of Schwan, Phil Sent: Wednesday, August 19, 2015 12:08 PM To: [email protected] Subject: RE: [External] [mssms] RE: Scheduled Task as Application - SCCM 2012R2 CU4 Invalid executable file dailyreboot.bat AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) Can you verify that the dailyreboot.bat file is in the C:\Windows\ccmcache\64 folder and not a subfolder? -Phil From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Daniel Ratliff Sent: Wednesday, August 19, 2015 12:15 PM To: [email protected]<mailto:[email protected]> Subject: RE: [External] [mssms] RE: Scheduled Task as Application - SCCM 2012R2 CU4 It's getting invalid executable, although it generally shouldn't matter, try changing schtasks to schtasks.exe or even adding the full path, c:\windows\system32\schtasks.exe. Daniel Ratliff From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Bradley, Matt Sent: Wednesday, August 19, 2015 12:06 PM To: [email protected]<mailto:[email protected]> Subject: RE: [External] [mssms] RE: Scheduled Task as Application - SCCM 2012R2 CU4 I've looked at the 32bit/64bit thing, tried checking/unchecking those boxes, but did not make a difference. I like running things as applications, because of the detection feature. Seems more accurate. I also like I can update the statistics and get fresh data, that I can't get from packages. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Schwan, Phil Sent: Wednesday, August 19, 2015 10:49 AM To: [email protected]<mailto:[email protected]> Subject: [External] [mssms] RE: Scheduled Task as Application - SCCM 2012R2 CU4 What Daniel said. I have to ask though...why are you using an Application to do this? This is much better suited to the Packages feature. -Phil _________________________________________________________________ Phil Schwan | Technical Architect, Enterprise Windows Services Microsoft VTSP ([email protected]<mailto:[email protected]>) Project Leadership Associates | 2000 Town Center, Suite 1900, Southfield, MI 48075 Lync: 312.756.1626 Mobile: 419.262.5133 www.projectleadership.net<http://www.projectleadership.net/> [linkedin_logo-19x20] <http://www.linkedin.com/in/philschwan> [Twitter-Logo1-20x20] <https://twitter.com/philschwan> [wordpress-logo3] <http://myitforum.com/myitforumwp/author/philschwan> [Description: Description: Description: Arrow email]Lead with Strategy. Leverage Technology. Deliver Results. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Daniel Ratliff Sent: Wednesday, August 19, 2015 11:30 AM To: [email protected]<mailto:[email protected]> Subject: [mssms] RE: Scheduled Task as Application - SCCM 2012R2 CU4 Packages run as 32-bit and Apps run as 64-bit. You might double check your directories and context and make sure it works in 64-bit. Daniel Ratliff From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Bradley, Matt Sent: Wednesday, August 19, 2015 11:01 AM To: [email protected]<mailto:[email protected]> Subject: [mssms] Scheduled Task as Application - SCCM 2012R2 CU4 Having an issue with sending out a batch file to write in a scheduled task. This batch file works when I run it manually. It works when I send it as a package. But it does not work when I send it as an application. The only difference I can think of would be the detection clause, but when looking at AppEnforce.log, it doesn't seem to have a problem detecting. Any ideas? Here is a chunk of that log: +++ Starting Install enforcement for App DT "Reboot Digital Signage Daily" ApplicationDeliveryType - ScopeId_5B03B582-B9FB-48DA-97F7-886D034CA337/DeploymentType_df7733c3-d34f-4707-8562-24b233ea0cc6, Revision - 8, ContentPath - C:\Windows\ccmcache\64, Execution Context - System AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) A user is logged on to the system. AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) Performing detection of app deployment type Reboot Digital Signage Daily(ScopeId_5B03B582-B9FB-48DA-97F7-886D034CA337/DeploymentType_df7733c3-d34f-4707-8562-24b233ea0cc6, revision 8) for system. AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) +++ Application not discovered. [AppDT Id: ScopeId_5B03B582-B9FB-48DA-97F7-886D034CA337/DeploymentType_df7733c3-d34f-4707-8562-24b233ea0cc6, Revision: 8] AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) App enforcement environment: Context: Machine Command line: dailyreboot.bat Allow user interaction: No UI mode: 0 User token: null Session Id: 3 Content path: C:\Windows\ccmcache\64 Working directory: AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) Prepared working directory: C:\Windows\ccmcache\64 AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) Invalid executable file dailyreboot.bat AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) CMsiHandler::EnforceApp failed (0x87d01106). AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) AppProvider::EnforceApp - Failed to invoke EnforceApp on Application handler(0x87d01106). AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) CommenceEnforcement failed with error 0x87d01106. AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) Method CommenceEnforcement failed with error code 87D01106 AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) ++++++ Failed to enforce app. Error 0x87d01106. ++++++ AppEnforce 8/18/2015 2:22:47 PM 25216 (0x6280) And this is what the one line command is in the batch file: schtasks /create /tn "Reboot PC Daily" /tr "C:\windows\system32\shutdown.exe -r -t 0" /sc daily /st 09:15 /RU SYSTEM /RL HIGHEST /F The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information. The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information.
