简体   繁体   English

PowerShell:如何将注册表项刷新到相应的配置单元

[英]PowerShell: How to flush registry key to respective hive

I'm trying to write values to the Run/RunOnce windows registry using PowerShell. 我正在尝试使用PowerShell将值写入Run / RunOnce Windows注册表。 The commands I'm using are successfully writing these values where they need to be. 我正在使用的命令成功地将这些值写入需要的位置。 However, after I've written these values I need to power cycle the system (so we're skipping the shutdown process for various reasons) which is causing those values I've written to the registry never to be flushed to the disk (that's part of the shutdown process.) So once my system powers back up the Run/RunOnce commands are no longer in the registry halting my automation process. 但是,在写入这些值之后,我需要重启系统电源(因此出于各种原因,我们跳过了关闭过程),这导致我写入注册表的值永远不会刷新到磁盘上(即部分关闭过程。)因此,一旦我的系统重新启动,Run / RunOnce命令就不再在注册表中停止我的自动化过程。

My question: Is there anyway through a PowerShell command to force the flushing of a registry value? 我的问题:是否通过PowerShell命令强制刷新注册表值?

您必须使用syinternals Sync实用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM