询问者
BGinfo:2016 Windows Server 推壁纸

问题
-
【情景描述】:企业文化宣传,需要AD域控推送桌面壁纸,想借助BGinfo推送,想知道如何设置,能兼容终端各种显示器(宽屏,方屏)?
一、“SysinternalsSuite” 里面有“Bginfo.exe”和“Bginfo64.exe” ,区别一个是32位系统一个是64位系统使用?设置好后,保存成:“zhkd.bgi ”
二、启动cmd脚本:bginfo.cmd
cmd /c
@echo off
%logonserver%\netlogon\bginfo\bginfo.exe /nolicprompt /i%logonserver%\netlogon\bginfo\zhkd.bgi /timer:00三、%logonserver%\netlogon\bginfo\ 路径下存放
1、zhkd.bgi =》配置文件
2、bginfo.exe =>应用程序
3、BG.jpg =》替换桌面背景
4、bginfo.cmd=> 启动脚本
上述这样配置即可?
- 已编辑 super.ma 2020年5月28日 14:06 配图
全部回复
-
你好,
个人感觉,完美的方案是通过下面的语句获得当前的分辨率,通过switch语句分配相应大小的壁纸。
Get-WmiObject -Class Win32_VideoController | Select-Object CurrentHorizontalResolution
参考:
WORKAROUND FOR BGINFO TILED WALLPAPER ON HIGH RESOLUTION SCREENS
PoC: Tatoo the background of your virtual machinesPlease remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
你好,
个人感觉,完美的方案是通过下面的语句获得当前的分辨率,通过switch语句分配相应大小的壁纸。
Get-WmiObject -Class Win32_VideoController | Select-Object CurrentHorizontalResolution
参考:
WORKAROUND FOR BGINFO TILED WALLPAPER ON HIGH RESOLUTION SCREENS
PoC: Tatoo the background of your virtual machines
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.具体如何操作?把壁纸和启动脚本放在一个文件夹,开机登录启动?
-
登录脚本可以。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
登录脚本可以。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.请分享详细的具体方法
https://p0w3rsh3ll.wordpress.com/2014/08/29/poc-tatoo-the-background-of-your-virtual-machines/ 这个打不开
-
$BGHT = @{ Text = $t ; Theme = "Black" ; FontName = "Verdana" ; UseCurrentWallpaperAsSource = $true ; } $WallPaper = New-BGinfo @BGHT Set-Wallpaper -Path $WallPaper.FullName -Style Fill # Restore the default VM wallpaper Set-Wallpaper -Path "%logonserver%\netlogon\bginfo\bg.jpg" -Style Fill
这段powershell脚本?保存cmd?还是VBS 放到终端启动项启动?
-
有点乱,我重新捋一下。
用下面的powershell登录脚本,通过If语句分配相应.bgi文件。
所用到的背景文件,bgi配置文件都可以放到共享文件夹。
$bginfo = Set-Location \\server\apps\bginfo\
$res = Get-WmiObject -Class Win32_VideoController | Select-Object CurrentHorizontalResolution
if ($res.CurrentHorizontalResolution -eq '1920')
{
Write-Host "bginfo1920 will apply"
$args = @('/TIMER:00', '/SILENT', '/NOLICPROMPT')
& "$bginfo.\bginfo.exe" "$bginfo.\Bginfo1920.bgi" $args
}elseif ($res.CurrentHorizontalResolution -eq '1680')
{
Write-Host "bginfo1680 will apply"
$args = @('/TIMER:00', '/SILENT', '/NOLICPROMPT')
& "$bginfo.\bginfo.exe" "$bginfo.\Bginfo1680.bgi" $args}
elseif ($res.CurrentHorizontalResolution -eq '1600')
{....}
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
3、双屏幕,屏幕显示半边黑屏,查看本地的文件发现,本地文件生成这样的缘故,为什么会这样?
%USERPROFILE%\Local Settings\Application Data\Winternals\BGInfo\BGInfo.bmp
你好,
bgi文件里直接指定UNC网络路径。其他关于组策略的问题,建议到Windows server 论坛提问,他们应该可以提供更有效的帮助。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
3、双屏幕,屏幕显示半边黑屏,查看本地的文件发现,本地文件生成这样的缘故,为什么会这样?
%USERPROFILE%\Local Settings\Application Data\Winternals\BGInfo\BGInfo.bmp
你好,
bgi文件里直接指定UNC网络路径。其他关于组策略的问题,建议到Windows server 论坛提问,他们应该可以提供更有效的帮助。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
登录脚本的执行用的是当前用户的凭据,可能是当前用户没有权限,可以尝试把共享文件夹设为everyone可以访问。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
- 已编辑 Xin GuoMicrosoft contingent staff 2020年6月3日 1:51
- 已建议为答案 Xin GuoMicrosoft contingent staff 2020年6月5日 2:07
-
3、双屏幕,屏幕显示半边黑屏,查看本地的文件发现,本地文件生成这样的缘故,为什么会这样?
%USERPROFILE%\Local Settings\Application Data\Winternals\BGInfo\BGInfo.bmp
你好,
bgi文件里直接指定UNC网络路径。其他关于组策略的问题,建议到Windows server 论坛提问,他们应该可以提供更有效的帮助。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.重新发布了,但是没人回帖
-
登录脚本的执行用的是当前用户的凭据,可能是当前用户没有权限,可以尝试把共享文件夹设为everyone可以访问。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
现在执行管理员身份 执行“bginfo.cmd”脚本,何故?
报错截图如下:
-
我们已经联系到其他组的工程师,他们正在研究,请您耐心等待,感谢你的理解。
这个报错可能是当前用户的凭据,没有权限的问题。
实在不行,就用xcopy把文件都拷贝到本地文件夹。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已编辑 Xin GuoMicrosoft contingent staff 2020年6月4日 6:29
-
你好,
我好像找到原因了。
在设置bgi的时候,应用桌面前都会转换成你之前提到BGInfo.bmp,把生成这个文件的路径设置到网络共享目录,问题应该就解决了。方法如下图:
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- 已编辑 Xin GuoMicrosoft contingent staff 2020年6月4日 7:55
-
登录脚本的执行用的是当前用户的凭据,可能是当前用户没有权限,可以尝试把共享文件夹设为everyone可以访问。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
现在执行管理员身份 执行“bginfo.cmd”脚本,何故?
报错截图如下:
原因找到了。
运行:%logonserver%\netlogon\bginfo\bginfo.exe,发现 background 里面的壁纸路径不对,重新设置BGI另存替换%logonserver%\netlogon\bginfo\zhkd.bgi 后,再执行“bginfo.cmd”脚本,正常了
另外:http://technet.microsoft.com/zh-cn/sysinternals/bb897557(en-us).aspx
编辑|插入图像:允许您在输出中插入位图图像。因为BGInfo的配置信息存储在注册表中,并且Windows限制了注册表值的大小,所以在插入较大的图像时可能会遇到错误。在Windows 9x / Me系统上,限制为16K,而在NT / 2000 / XP系统上,限制为64K。
- 已建议为答案 Xin GuoMicrosoft contingent staff 2020年6月5日 2:07
-
你好,
正如文章里说的,这个限制是在NT/XP时代,现在肯定变大了。
至少我的环境中图片JPG大于1MB, BMP大于15MB也没有报错。
如果您遇到问题,可以发新的帖子我帮你看看。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.