if I install sap after OSD, it exit code is 0.
but if I runn during OSD, it exit code is 0x80070081, and then I checked the sap, I found it seem to work fine.
Here is the logs of application installation
Install by SMS CMClient ---succeed
http://1drv.ms/1kzt4LG
Install by OSD ---failed
http://1drv.ms/1kzuoye
-----------------------------
Waiting for job status notification...InstallSoftware2014/4/11 12:57:553864 (0x0F18)
Waiting for job status notification...InstallSoftware2014/4/11 12:58:253864 (0x0F18)
Waiting for job status notification...InstallSoftware2014/4/11 12:58:553864 (0x0F18)
CompleteExecution receivedInstallSoftware2014/4/11 12:59:093132 (0x0C3C)
CompleteExecution processedInstallSoftware2014/4/11 12:59:093132 (0x0C3C)
Received job completion notification from Execution ManagerInstallSoftware2014/4/11 12:59:093864 (0x0F18)
Installation completed with exit code 0x80070081InstallSoftware2014/4/11 12:59:093864 (0x0F18)
Installation failed with error (0x80070081)InstallSoftware2014/4/11 12:59:093864 (0x0F18)
Setting TSEnv variable 'SMSTSInstallSoftwareJobID_00100021_0012000A_SAP'=''InstallSoftware2014/4/11 12:59:093864 (0x0F18)
GetExecRequestMgrInterface successfulInstallSoftware2014/4/11 12:59:093864 (0x0F18)
Releasing job request, jobID='{B8D6032A-D2A4-4C9F-85EB-99E3773589CF}'InstallSoftware2014/4/11 12:59:093864 (0x0F18)
Releasing of Job Request successfulInstallSoftware2014/4/11 12:59:093864 (0x0F18)
CompleteJob successfulInstallSoftware2014/4/11 12:59:093864 (0x0F18)
ReleaseSource() for C:\_SMSTaskSequence\Packages\00100021.InstallSoftware2014/4/11 12:59:093864 (0x0F18)
reference count 1 for the source C:\_SMSTaskSequence\Packages\00100021 before releasingInstallSoftware2014/4/11 12:59:093864 (0x0F18)
Released the resolved source C:\_SMSTaskSequence\Packages\00100021InstallSoftware2014/4/11 12:59:093864 (0x0F18)
pInstall->Install(sPackageID, sProgramName), HRESULT=80070081 (e:\nts_sccm_release\sms\client\osdeployment\installsoftware\main.cpp,361)InstallSoftware2014/4/11 12:59:093864 (0x0F18)
Install Software failed, hr=0x80070081InstallSoftware2014/4/11 12:59:093864 (0x0F18)
Process completed with exit code 2147942529
TSManager2014/4/11 12:59:092068 (0x0814)
!--------------------------------------------------------------------------------------------!TSManager2014/4/11 12:59:092068 (0x0814)
Failed to run the action: SAP.
The application cannot be run in Win32 mode. (Error: 80070081; Source: Windows)TSManager2014/4/11 12:59:092068 (0x0814)
MP server http://PRI1.ABC.COM. Ports 80,443. CRL=false.TSManager2014/4/11 12:59:092068 (0x0814)
Setting authenticatorTSManager2014/4/11 12:59:092068 (0x0814)
Set authenticator in transportTSManager2014/4/11 12:59:092068 (0x0814)
Sending StatusMessageTSManager2014/4/11 12:59:092068 (0x0814)
Setting message signatures.TSManager2014/4/11 12:59:092068 (0x0814)
Setting the authenticator.TSManager2014/4/11 12:59:092068 (0x0814)
CLibSMSMessageWinHttpTransport::Send: URL: PRI1.ABC.COM:80 CCM_POST /ccm_system/requestTSManager2014/4/11 12:59:092068 (0x0814)
Request was successful.TSManager2014/4/11 12:59:102068 (0x0814)
Set a global environment variable _SMSTSLastActionRetCode=-2147024767TSManager2014/4/11 12:59:102068 (0x0814)
Set a global environment variable _SMSTSLastActionSucceeded=falseTSManager2014/4/11 12:59:102068 (0x0814)
Clear local default environmentTSManager2014/4/11 12:59:102068 (0x0814)