美化WinPE系统的提示方式
在正常的系统提示一般都会有气泡提示,想不想在PE下也实现这个功能呢?
在WinPE系统中无需usp10.dll、sysdm.cpl的支持,套用 批处理代码。在没有THEMEUI.DLL支持的情况下,PECMD的WALL 命令是无效的。批处理代码如下:
@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背景的办法
(责任编辑:一键u盘装系统)