[英]Powershell - set desktop background for specific user (Windows 7 and/or 2008 Server)
Assuming I am logged on as administrator, can I use PowerShell to assign a desktop background image to a specific user account? 假设我以管理员身份登录,是否可以使用PowerShell将桌面背景图像分配给特定用户帐户?
I've seen answers similar to this one Powershell script from shortcut to change desktop where the following is used 我已经看到类似于这一个Powershell脚本的答案, 从快捷方式更改桌面 ,其中使用了以下内容
RegistryKey key = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true);
Which, I assume, will work for the currently logged on user. 我认为,这将适用于当前登录的用户。 How would I do that for the user that is not logged on (any user)? 如何为未登录的用户(任何用户)执行此操作?
The user did not have a desktop background set before. 用户之前没有设置桌面背景。
Any other automated solution welcome, not limited to PowerShell. 任何其他自动化解决方案欢迎,不仅限于PowerShell。
The general consensus seems to be that you need to load the user's registry hive. 普遍的共识似乎是您需要加载用户的注册表配置单元。 I think this is what you're looking for: http://jrich523.wordpress.com/2012/03/06/powershell-loading-and-unloading-registry-hives/ 我想这就是你要找的东西: http : //jrich523.wordpress.com/2012/03/06/powershell-loading-and-unloading-registry-hives/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.