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



Reply via email to