I have created a package with a .reg file. The program command line is regedit.exe /s:AllowOsUpdate.reg. According to execmgr.log the command runs successfully, but the registry is never modified. Configuration Manager is version 1902.
The ConfigMgr client version is 5.00.8790.1007 running on Windows 10 x64 build 1803. The package is deployed as system, whether a user is logged on or not.
From the execmgr log on the client:
![LOG[MTC signaled SWD execution request with program id: Merge AllowOSUpgrade, package id: QH100141 for execution.]LOG]!><time="07:56:31.336+240" date="06-05-2019" component="execmgr" context="" type="1"
thread="6028" file="execreqmgr.cpp:6479">
<![LOG[CExecutionRequest::OnEvaluateForExecution: Evaluate Program Merge AllowOSUpgrade [Advert QH1201E0] targeted to System. Current State : 7]LOG]!><time="07:56:31.461+240" date="06-05-2019" component="execmgr" context=""
type="0" thread="6028" file="executionrequest.cpp:2123">
<![LOG[Sending ack to MTC for task with id: {4FCB554B-5757-4B93-8879-0E561B991E4E}]LOG]!><time="07:56:31.461+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="executionrequest.cpp:9128">
<![LOG[CExecutionRequest::EnterRsRuningState Merge AllowOSUpgrade]LOG]!><time="07:56:31.461+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="executionrequest.cpp:3180">
<![LOG[Executing program regedit.exe /s:AllowOSUpdate.reg in Admin context]LOG]!><time="07:56:31.461+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="executionrequest.cpp:3291">
<![LOG[Execution Request for advert QH1201E0 package QH100141 program Merge AllowOSUpgrade state change from Ready to NotifyExecution]LOG]!><time="07:56:31.461+240" date="06-05-2019" component="execmgr" context=""
type="1" thread="6028" file="executionrequest.cpp:514">
<![LOG[CUIEventGenerator::NotifyProgramStateChanged entered]LOG]!><time="07:56:31.461+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="uieventgenerator.cpp:421">
<![LOG[RaiseClientSDKEvent: Raising a client SDK WMI event]LOG]!><time="07:56:31.492+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="Event.cpp:518">
<![LOG[Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="QH100141",ProgramID="Merge AllowOSUpgrade", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l]LOG]!><time="07:56:31.492+240"
date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="Event.cpp:529">
<![LOG[RaiseClientSDKEvent: A client SDK WMI event is raised up successfully]LOG]!><time="07:56:31.492+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="Event.cpp:579">
<![LOG[CUIEventGenerator::NotifyProgramStateChanged succeeded]LOG]!><time="07:56:31.492+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="uieventgenerator.cpp:430">
<![LOG[Persisting request for program Merge AllowOSUpgrade package QH100141 in state Running]LOG]!><time="07:56:31.492+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="executionrequest.cpp:844">
<![LOG[ExecuteScriptByScriptEngine: User context passed to ExecuteProgram is [NT AUTHORITY\SYSTEM].]LOG]!><time="07:56:31.508+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="scriptenginehelper.cpp:405">
<![LOG[CExecutionContext::CExecutionContext]LOG]!><time="07:56:31.508+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="executioncontext.cpp:115">
<![LOG[Command line arguments when parsed regedit.exe]LOG]!><time="07:56:31.508+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="cmdline.cpp:95">
<![LOG[Command line arguments when parsed /s:AllowOSUpdate.reg]LOG]!><time="07:56:31.508+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="cmdline.cpp:95">
<![LOG[Checking content location C:\WINDOWS\ccmcache\42 for use]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="executioncontext.cpp:1663">
<![LOG[Successfully selected content location C:\WINDOWS\ccmcache\42]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="executioncontext.cpp:1719">
<![LOG[!sTempString.empty(), HRESULT=80070057 (..\String.cpp,1109)]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="String.cpp:1109">
<![LOG[!sTempString.empty(), HRESULT=80070057 (..\String.cpp,1109)]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="String.cpp:1109">
<![LOG[CProgramExecution::CProgramExecution]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="programexecution.cpp:24">
<![LOG[Executing program as a script]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="executionengine.cpp:82">
<![LOG[File C:\WINDOWS\ccmcache\42\regedit.exe is not a valid executable file]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="3" thread="6028" file="execengnutility.cpp:202">
<![LOG[File C:\WINDOWS\ccmcache\42\regedit.exe is not a valid executable file]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="3" thread="6028" file="execengnutility.cpp:202">
<![LOG[Found executable file regedit.exe with complete path C:\WINDOWS\regedit.exe]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="execengnutility.cpp:296">
<![LOG[Successfully prepared command line "C:\WINDOWS\regedit.exe" /s:AllowOSUpdate.reg]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="scriptexecution.cpp:651">
<![LOG[Command line = "C:\WINDOWS\regedit.exe" /s:AllowOSUpdate.reg, Working Directory = C:\WINDOWS\ccmcache\42\]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1"
thread="6028" file="scriptexecution.cpp:352">
<![LOG[Cached CCM (user, session) is: (S-1-5-21-725345543-706699826-839522115-21493,1).]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="usertoken.cpp:598">
<![LOG[::GetSMSConsoleSessionId - SMS Console Session ID is: 1]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="usertoken.cpp:248">
<![LOG[Running "C:\WINDOWS\regedit.exe" /s:AllowOSUpdate.reg with 32bitLauncher]LOG]!><time="07:56:31.523+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="scriptexecution.cpp:370">
<![LOG[Created Process for the passed command line]LOG]!><time="07:56:31.602+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="scriptexecution.cpp:514">
<![LOG[Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramStartedEvent
{
AdvertisementId = "QH1201E0";
ClientID = "GUID:48d1a812-970a-467d-a9c0-2aefe6db0b0f";
CommandLine = "\"C:\\WINDOWS\\regedit.exe\" /s:AllowOSUpdate.reg";
DateTime = "20190605115631.617000+000";
MachineName = "COMPUTER-4110A";
PackageName = "QH100141";
ProcessID = 1568;
ProgramName = "Merge AllowOSUpgrade";
SiteCode = "QH1";
ThreadID = 6028;
UserContext = "NT AUTHORITY\\SYSTEM";
WorkingDirectory = "C:\\WINDOWS\\ccmcache\\42\\";
};
]LOG]!><time="07:56:31.617+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="Event.cpp:840">
<![LOG[Successfully submitted event to the Status Agent.]LOG]!><time="07:56:31.617+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="Event.cpp:862">
<![LOG[Raised Program Started Event for Ad:QH1201E0, Package:QH100141, Program: Merge AllowOSUpgrade]LOG]!><time="07:56:31.617+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="executioncontext.cpp:459">
<![LOG[GetProcessInfo - Process creation time high = 30743445, low = 3074601341]LOG]!><time="07:56:31.617+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="executioncontext.cpp:2397">
<![LOG[Execution Manager received Temp Path C:\WINDOWS\TEMP\]LOG]!><time="07:56:31.617+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="scriptenginehelper.cpp:444">
<![LOG[CUIEventGenerator::NotifyProgramStarted entered]LOG]!><time="07:56:31.617+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="uieventgenerator.cpp:390">
<![LOG[Program exit code 0]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6252" file="scriptexecution.cpp:677">
<![LOG[CExecutionStatus::CExecutionStatus]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6252" file="executionstatus.cpp:27">
<![LOG[Looking for MIF file to get program status]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6252" file="executionstatus.cpp:282">
<![LOG[Looking for MIF file in directory C:\WINDOWS\]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6252" file="executionstatus.cpp:295">
<![LOG[Looking for MIF file in directory C:\WINDOWS\system32\]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6252" file="executionstatus.cpp:295">
<![LOG[Script for Package:QH100141, Program: Merge AllowOSUpgrade succeeded with exit code 0]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6252"
file="executionstatus.cpp:262">
<![LOG[Raising event:
[SMS_CodePage(437), SMS_LocaleID(1033)]
instance of SoftDistProgramCompletedSuccessfullyEvent
{
AdvertisementId = "QH1201E0";
ClientID = "GUID:48d1a812-970a-467d-a9c0-2aefe6db0b0f";
DateTime = "20190605115631.664000+000";
MachineName = "COMPUTER-4110A";
PackageName = "QH100141";
ProcessID = 1568;
ProgramName = "Merge AllowOSUpgrade";
SiteCode = "QH1";
ThreadID = 6252;
UserContext = "NT AUTHORITY\\SYSTEM";
};
]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6252" file="Event.cpp:840">
<![LOG[Successfully submitted event to the Status Agent.]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6252" file="Event.cpp:862">
<![LOG[Raised Program Success Event for Ad:QH1201E0, Package:QH100141, Program: Merge AllowOSUpgrade]LOG]!><time="07:56:31.664+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6252"
file="executioncontext.cpp:483">
<![LOG[Execution is complete for program Merge AllowOSUpgrade. The exit code is 0, the execution status is Success]LOG]!><time="07:56:31.680+240" date="06-05-2019" component="execmgr" context="" type="1"
thread="2076" file="execreqmgr.cpp:4238">
<![LOG[RaiseClientSDKEvent: Raising a client SDK WMI event]LOG]!><time="07:56:31.711+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="Event.cpp:518">
<![LOG[Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="QH100141",ProgramID="Merge AllowOSUpgrade", actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l]LOG]!><time="07:56:31.711+240"
date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="Event.cpp:529">
<![LOG[RaiseClientSDKEvent: A client SDK WMI event is raised up successfully]LOG]!><time="07:56:31.711+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="Event.cpp:579">
<![LOG[CUIEventGenerator::NotifyProgramStarted succeeded]LOG]!><time="07:56:31.711+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="uieventgenerator.cpp:398">
<![LOG[CUIEventGenerator::NotifyProgramStateChanged entered]LOG]!><time="07:56:31.711+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="uieventgenerator.cpp:421">
<![LOG[RaiseClientSDKEvent: Raising a client SDK WMI event]LOG]!><time="07:56:31.727+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="Event.cpp:518">
<![LOG[Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="QH100141",ProgramID="Merge AllowOSUpgrade", actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l]LOG]!><time="07:56:31.727+240"
date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="Event.cpp:529">
<![LOG[RaiseClientSDKEvent: A client SDK WMI event is raised up successfully]LOG]!><time="07:56:31.742+240" date="06-05-2019" component="execmgr" context="" type="0" thread="6028" file="Event.cpp:579">
<![LOG[CUIEventGenerator::NotifyProgramStateChanged succeeded]LOG]!><time="07:56:31.742+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="uieventgenerator.cpp:430">
<![LOG[Persisting request for program Merge AllowOSUpgrade package QH100141 in state Running]LOG]!><time="07:56:31.742+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028"
file="executionrequest.cpp:844">
<![LOG[EvaluateRequestForExecution - Updated current running request]LOG]!><time="07:56:31.742+240" date="06-05-2019" component="execmgr" context="" type="1" thread="6028" file="execreqmgr.cpp:1151">
<![LOG[In CExecutionManager::Notify]LOG]!><time="07:56:31.742+240" date="06-05-2019" component="execmgr" context="" type="1" thread="224" file="execmgr.cpp:2391">
<![LOG[Received isntance modification notification for MTC Task.]LOG]!><time="07:56:31.742+240" date="06-05-2019" component="execmgr" context="" type="1" thread="224" file="execmgr.cpp:2520">
<![LOG[MTC task with id {4FCB554B-5757-4B93-8879-0E561B991E4E}, changed state from 4 to 5]LOG]!><time="07:56:31.742+240" date="06-05-2019" component="execmgr" context="" type="1" thread="224"
file="execreqmgr.cpp:6361">
<![LOG[FindUserOrSystemPolicy called for QH1201E0-Merge AllowOSUpgrade-QH100141 for user user]LOG]!><time="07:56:31.758+240" date="06-05-2019" component="execmgr" context="" type="0" thread="2076"
file="execreqhelper.cpp:77">
<![LOG[CSoftwareDistPolicyMgr::GetPolicyFromWMIObject - Check if TS Policy]LOG]!><time="07:56:31.773+240" date="06-05-2019" component="execmgr" context="" type="0" thread="2076" file="softdistpolicy.cpp:1982">
<![LOG[[QH1201E0 Merge AllowOSUpgrade QH100141] Enabled for optional pre-download: False]LOG]!><time="07:56:31.773+240" date="06-05-2019" component="execmgr" context="" type="0" thread="2076"
file="softdistpolicy.cpp:2246">
<![LOG[CUIEventGenerator::NotifyExecutionComplete entered]LOG]!><time="07:56:31.805+240" date="06-05-2019" component="execmgr" context="" type="1" thread="2076" file="uieventgenerator.cpp:563">
<![LOG[RaiseClientSDKEvent: Raising a client SDK WMI event]LOG]!><time="07:56:31.883+240" date="06-05-2019" component="execmgr" context="" type="0" thread="2076" file="Event.cpp:518">
<![LOG[Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="QH100141",ProgramID="Merge AllowOSUpgrade", actionType 10l, value Result:TRUE ,SDKCallerId:, user NULL, session 4294967295l, level 0l, verbosity 30l]LOG]!><time="07:56:31.883+240"
date="06-05-2019" component="execmgr" context="" type="1" thread="2076" file="Event.cpp:529">
<![LOG[RaiseClientSDKEvent: A client SDK WMI event is raised up successfully]LOG]!><time="07:56:31.899+240" date="06-05-2019" component="execmgr" context="" type="0" thread="2076" file="Event.cpp:579">
<![LOG[CUIEventGenerator::NotifyExecutionComplete succeeded]LOG]!><time="07:56:31.899+240" date="06-05-2019" component="execmgr" context="" type="1" thread="2076" file="uieventgenerator.cpp:580">
<![LOG[Deleting request from pending queue, package QH100141, program Merge AllowOSUpgrade, advertisement QH1201E0]LOG]!><time="07:56:31.899+240" date="06-05-2019" component="execmgr" context="" type="1"
thread="2076" file="execreqmgr.cpp:8948">
<![LOG[CExecutionRequest::InvalidAndDeleteFromWmiAndMTC Merge AllowOSUpgrade]LOG]!><time="07:56:31.899+240" date="06-05-2019" component="execmgr" context="" type="1" thread="2076" file="executionrequest.cpp:1460">
<![LOG[Requesting MTC to delete task with id: {4FCB554B-5757-4B93-8879-0E561B991E4E}]LOG]!><time="07:56:31.899+240" date="06-05-2019" component="execmgr" context="" type="1" thread="2076"
file="executionrequest.cpp:9159">
<![LOG[MTC task with id: {4FCB554B-5757-4B93-8879-0E561B991E4E} deleted successfully.]LOG]!><time="07:56:31.899+240" date="06-05-2019" component="execmgr" context="" type="1" thread="2076"
file="executionrequest.cpp:9188">
<![LOG[Called delete and free Request for advert QH1201E0, package QH100141, program Merge AllowOSUpgrade]LOG]!><time="07:56:31.945+240" date="06-05-2019" component="execmgr" context="" type="1"
thread="2076" file="pendingreq.cpp:73">
<![LOG[Execution request deleted for package QH100141 program Merge AllowOSUpgrade, advert QH1201E0]LOG]!><time="07:56:31.945+240" date="06-05-2019" component="execmgr" context="" type="1" thread="2076"
file="executionrequest.cpp:439">
<![LOG[CUIEventGenerator::NotifyProgramStateChanged entered]LOG]!><time="07:56:31.945+240" date="06-05-2019" component="execmgr" context="" type="1" thread="2076" file="uieventgenerator.cpp:421">
If I open an administrator command prompt, change directory to c:\windows\ccmcache\42 and execute the command "regedit.exe /s:AllowOSUpdate.reg" the registry key and dword value are added to the registry.
The content of the reg file is:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade]
"AllowOSUpgrade"=dword:00000001
Unlike some of the other threads about importing a reg file, this package does not modify another part of the registry. The AllowOSUpgrade key cannot be found in the target machine's registry after the package executes. I've modified the registry
using import files for years. I have now tried this package on 7 different Window 10 machines running builds 1803, 1809 and 1903. Zero success. The answer must be staring me in the face.
Guidance from another set of eyes will be much appreciated. TIA