假设我以管理员身份登录,我可以使用 PowerShell 为特定用户帐户分配桌面背景图像吗?
我看过类似的答案 Powershell script from shortcut to change desktop 使用以下内容的地方
RegistryKey key = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true);
我认为,这将适用于当前登录的用户。我将如何为未登录的用户(任何用户)执行此操作?
用户之前没有设置桌面背景。
欢迎任何其他自动化解决方案,不限于 PowerShell。
最佳答案
普遍的共识似乎是您需要加载用户的注册表配置单元。我想这就是您要找的:http://jrich523.wordpress.com/2012/03/06/powershell-loading-and-unloading-registry-hives/
关于windows - Powershell - 为特定用户设置桌面背景(Windows 7 和/或 2008 Server),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16390952/