过期罐头电脑论坛-win7、win10雨人系统下载

过期罐头电脑论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 712|回复: 0
收起左侧

让PE冒气泡提示的代码

[复制链接]
发表于 2012-12-11 08:10:40 | 显示全部楼层 |阅读模式
代码如下:
@echo off
title 更换壁纸
setlocal enableDelayedExpansion
set pic=%1
if "!pic!"=="" call :search
if "!pic!"=="" set pic="%userProfile%\Local Settings\Application
Data\Microsoft\Wallpaper1.bmp"
echo 正在添加注册表项目...
reg add "HKCU\Control Panel\Desktop" /v Wallpaper /d !pic! /f>nul
reg add "HKCU\Control Panel\Desktop" /v WallpaperStyle /d "2" /f>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v Wallpaper /d !
pic! /f>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v WallpaperStyle
/d "2" /f>nul
echo 正在更换桌面背景
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
goto :eof
:search
 cd/d "%~dp0"
 for /f "delims=" %%a in ('dir/b *.jpg *.bmp') do (
  set pic="%~dp0%%a"
 )
 goto :eof
============================================================
::确保有"%userProfile%\Local Settings\Application Data\Microsoft\Wallpaper1.bmp"
@echo off
title 还原壁纸
set pic="%userProfile%\Local Settings\Application Data\Microsoft\Wallpaper1.bmp"
echo 正在添加注册表项目...
reg add "HKCU\Control Panel\Desktop" /v Wallpaper /d %pic% /f>nul
reg add "HKCU\Control Panel\Desktop" /v WallpaperStyle /d "2" /f>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v Wallpaper /d %
pic% /f>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v WallpaperStyle
/d "2" /f>nul
echo 正在还原桌面背景
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
goto :eof
  分两步完成,这是目前不用THEMEUI.DLL支持也能换JPG背景的办法
您需要登录后才可以回帖 登录 | 注册

本版积分规则

win7 64位旗舰版下载|win10系统下载|win7旗舰版|联系我们|网站地图|过期罐头电脑论坛

GMT+8, 2017-12-11 19:00 , Processed in 0.119479 second(s), 18 queries .

官方免责声明:本站内容来自网友和互联网.若侵犯到您的版权.请致信联系,我们将第一时间删除相关内容!

Powered by Discuz!

过期罐头电脑论坛

win7旗舰版_windows10

快速回复 返回顶部 返回列表