I am trying to uninstall SCEP through sccm with .bat file. But i m getting bad environment error in execmgr.log file.
bat file command line
Below are the logs details.
Processing [{7F74737F-491E-4699-8D8B-43FC7A8CF595}, 0]: OnContentAvailable execmgr 10/10/2019 5:10:57 PM 6036 (0x1794)
[{7F74737F-491E-4699-8D8B-43FC7A8CF595}]: Content Version 3 is available for advert HGC20016, pkg: HGC00031, program SCEP Uninstall. execmgr 10/10/2019 5:10:57 PM 6036 (0x1794)
An existing MTC token was not supplied, using ExecutionRequest's Id as MTC token and this execution request is the owner of resultant MTC task. execmgr 10/10/2019 5:10:57 PM 6036 (0x1794)
Request a MTC task for execution request of package HGC00031, program SCEP Uninstall with request id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} execmgr 10/10/2019 5:10:57 PM 6036 (0x1794)
Execution Request for advert HGC20016 package HGC00031 program SCEP Uninstall state change from WaitingContent to Ready execmgr 10/10/2019 5:10:59 PM 6036 (0x1794)
MTC task with id {AAA735E9-906A-4EEA-A775-A8764CE2931D}, changed state from 0 to 4 execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="HGC00031",ProgramID="SCEP Uninstall", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 10/10/2019 5:10:59 PM 6036 (0x1794)
Processing [{7F74737F-491E-4699-8D8B-43FC7A8CF595}, 0]: RemoveNotification execmgr 10/10/2019 5:10:59 PM 6036 (0x1794)
MTC signaled SWD execution request with program id: SCEP Uninstall, package id: HGC00031 for execution. execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Sending ack to MTC for task with id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Executing program "Uninstall MEP.bat" in Admin context execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Execution Request for advert HGC20016 package HGC00031 program SCEP Uninstall state change from Ready to NotifyExecution execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="HGC00031",ProgramID="SCEP Uninstall", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Checking content location C:\Windows\ccmcache\4 for use execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Successfully selected content location C:\Windows\ccmcache\4 execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Executing program as a script execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Invalid executable file "Uninstall MEP.bat" execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramBadEnvironmentEvent
{
AdvertisementId = "HGC20016";
ClientID = "GUID:EC8E73DC-C143-408D-918C-5840C2B2EB32";
CommandLine = "\"Uninstall MEP.bat\"";
DateTime = "20191010114100.133000+000";
DriveLetter = "";
MachineName = "xyz";
PackageName = "HGC00031";
ProcessID = 2628;
ProgramName = "SCEP Uninstall";
SiteCode = "HGC";
ThreadID = 4116;
Win32ErrorCode = 2147942402;
WorkingDirectory = "";
};
execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Raised Program Bad Environment Event for Ad:HGC20016, Package:HGC00031, Program: SCEP Uninstall execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
EnterRsRuningState failed to run script "Uninstall MEP.bat" 0x87d01106 execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Fatal error 0x87d01106 enountered for program SCEP Uninstall. This program will not retry. execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Requesting MTC to delete task with id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
MTC task with id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} deleted successfully. execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="HGC00031",ProgramID="SCEP Uninstall", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Requesting MTC to delete task with id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
This execution request does not have a corresponding task in MTC. execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
MTC task with id {AAA735E9-906A-4EEA-A775-A8764CE2931D}, changed state from 4 to 5 execmgr 10/10/2019 5:11:00 PM 7348 (0x1CB4)
Thanks !
bat file command line
| @echo off C:\Windows\ccmsetup\scepinstall.exe /u /s |
Below are the logs details.
Processing [{7F74737F-491E-4699-8D8B-43FC7A8CF595}, 0]: OnContentAvailable execmgr 10/10/2019 5:10:57 PM 6036 (0x1794)
[{7F74737F-491E-4699-8D8B-43FC7A8CF595}]: Content Version 3 is available for advert HGC20016, pkg: HGC00031, program SCEP Uninstall. execmgr 10/10/2019 5:10:57 PM 6036 (0x1794)
An existing MTC token was not supplied, using ExecutionRequest's Id as MTC token and this execution request is the owner of resultant MTC task. execmgr 10/10/2019 5:10:57 PM 6036 (0x1794)
Request a MTC task for execution request of package HGC00031, program SCEP Uninstall with request id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} execmgr 10/10/2019 5:10:57 PM 6036 (0x1794)
Execution Request for advert HGC20016 package HGC00031 program SCEP Uninstall state change from WaitingContent to Ready execmgr 10/10/2019 5:10:59 PM 6036 (0x1794)
MTC task with id {AAA735E9-906A-4EEA-A775-A8764CE2931D}, changed state from 0 to 4 execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="HGC00031",ProgramID="SCEP Uninstall", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 10/10/2019 5:10:59 PM 6036 (0x1794)
Processing [{7F74737F-491E-4699-8D8B-43FC7A8CF595}, 0]: RemoveNotification execmgr 10/10/2019 5:10:59 PM 6036 (0x1794)
MTC signaled SWD execution request with program id: SCEP Uninstall, package id: HGC00031 for execution. execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Sending ack to MTC for task with id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Executing program "Uninstall MEP.bat" in Admin context execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Execution Request for advert HGC20016 package HGC00031 program SCEP Uninstall state change from Ready to NotifyExecution execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="HGC00031",ProgramID="SCEP Uninstall", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 10/10/2019 5:10:59 PM 4116 (0x1014)
Checking content location C:\Windows\ccmcache\4 for use execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Successfully selected content location C:\Windows\ccmcache\4 execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Executing program as a script execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Invalid executable file "Uninstall MEP.bat" execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramBadEnvironmentEvent
{
AdvertisementId = "HGC20016";
ClientID = "GUID:EC8E73DC-C143-408D-918C-5840C2B2EB32";
CommandLine = "\"Uninstall MEP.bat\"";
DateTime = "20191010114100.133000+000";
DriveLetter = "";
MachineName = "xyz";
PackageName = "HGC00031";
ProcessID = 2628;
ProgramName = "SCEP Uninstall";
SiteCode = "HGC";
ThreadID = 4116;
Win32ErrorCode = 2147942402;
WorkingDirectory = "";
};
execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Raised Program Bad Environment Event for Ad:HGC20016, Package:HGC00031, Program: SCEP Uninstall execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
EnterRsRuningState failed to run script "Uninstall MEP.bat" 0x87d01106 execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Fatal error 0x87d01106 enountered for program SCEP Uninstall. This program will not retry. execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Requesting MTC to delete task with id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
MTC task with id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} deleted successfully. execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="HGC00031",ProgramID="SCEP Uninstall", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
Requesting MTC to delete task with id: {AAA735E9-906A-4EEA-A775-A8764CE2931D} execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
This execution request does not have a corresponding task in MTC. execmgr 10/10/2019 5:11:00 PM 4116 (0x1014)
MTC task with id {AAA735E9-906A-4EEA-A775-A8764CE2931D}, changed state from 4 to 5 execmgr 10/10/2019 5:11:00 PM 7348 (0x1CB4)
Thanks !