简体   繁体   中英

PowerShell: How to flush registry key to respective hive

I'm trying to write values to the Run/RunOnce windows registry using PowerShell. 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.

My question: Is there anyway through a PowerShell command to force the flushing of a registry value?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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