China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-27 17:17
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Change desktop background View 11,578 Replies 30
Original Poster Posted 2006-11-22 12:31 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
Excuse me, how to achieve changing the desktop background with batch processing?
Floor 2 Posted 2006-11-22 22:08 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
) The desktop background file is generally a default.BMP image format file, and it is defaultly located in the %SystemRoot% directory.

) Find the registry:

Set a background on the Windows desktop and note down its file name.

If you don't know where the desktop setting is in the registry, what should you do?
(Enter Regedit to edit the registry, find the file name you just found, and the found position is the desktop setting part. You don't need to memorize the location of this thing)

After finding it, you will know its position.

) Once you know its position, you can use the Reg.exe tool to modify its value in the batch processing.
How to modify it?
Type REG.EXE /? to view the help:)
There are more examples of operating the registry in the forum "Search" function:)


) The above is the "principle" to complete this task when you don't know how to use batch processing to change the desktop background, don't know where the registry is, and don't know how to use Reg.exe.


Note: The above has been tested in the XP environment and is completely feasible.
So, Brother chainliq can refer to this idea to find out the method~:)
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 3 Posted 2006-11-22 22:12 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
Hehe, found it out. But when I import the registry, I need to log off once for it to take effect. Is there a way to make it take effect immediately without logging off! That is, to take effect right after import!
Floor 4 Posted 2006-11-22 22:15 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
I saw a post on the forum last time about the method to refresh the desktop immediately. That author still posted in multiple places, I remember, haha... I'll help you look for it (I'll only look for 5 minutes, if I can't find it, I won't look anymore, haha...), you can also look for it : )
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 5 Posted 2006-11-22 22:19 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
Take a look at this post, which has content related to refreshing: )

http://www.cn-dos.net/forum/viewthread.php?tid=24465&fpage=1&highlight=%E5%88%B7%E6%96%B0
How to use Rundll32 to "refresh the desktop" and reload "explorer.exe"?
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 6 Posted 2006-11-22 22:47 ·  中国 北京 联通
银牌会员
★★★
努力做坏人
Credits 1,185
Posts 438
Joined 2006-08-28 12:00
19-year member
UID 61449
From 北京
Status Offline
Actually, the LZ can also try using third-party tools to have a go.
http://www.cn-dos.net/forum/viewthread.php?tid=23132&fpage=1&highlight=%2B9527
我今后在论坛的目标就是做个超级坏人!!!
Floor 7 Posted 2006-11-23 00:11 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
Then I'll post a tool produced by Microsoft.

Microsoft-produced "Desktop Wallpaper Auto-Changer"

Wallpaper Auto-Changer (Slide Show) is a desktop enhancement tool produced by Microsoft. After installation, it will be integrated into "Display Properties". You can specify any folder containing the wallpaper images you want as the image directory for Wallpaper Auto-Changer. In the "Frequency" option, you can set the time for automatically updating the wallpaper, from one second to one hour or one month, and whether to automatically change the new wallpaper each time the Windows system starts is up to you. When you sit in front of the computer to study and work, the brand-new wallpapers brought to you by Wallpaper Auto-Changer will definitely bring you a relaxed and happy mood.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
redtek +1 2006-11-23 06:22
Attachments
微软出品“桌面壁纸自动换”.rar (74.37 KiB, Credits to download 1 pts, Downloads: 201)
Floor 8 Posted 2006-11-23 01:34 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 906
Posts 346
Joined 2006-07-10 09:58
19-year member
UID 58334
Gender Male
Status Offline
"Microsoft-produced "Desktop Wallpaper Auto-Switch"

This software is not easy to delete. I used it once. In order to delete it, I searched online for a long time`````````
Floor 9 Posted 2006-11-23 01:39 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
But, since we can implement the code for changing the desktop background with batch processing, why do we still like third-party tools so much?

I guess Brother chainliq's code for changing the desktop background using batch processing should be out by now.
Personally, I suggest that the batch processing professional forum should encourage implementing ideas with batch processing ~:)

Brother chainliq, if you make it, upload it and I'll give you extra points ~:)

[ Last edited by redtek on 2006-11-22 at 12:43 PM ]
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 10 Posted 2006-11-23 02:46 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
No...
Microsoft's "Desktop Wallpaper Auto Switch"
Only two files...

One is bgswitch.dll
The other is bgswitch.exe
Both files are in the system32 directory...

And there is only one value in the registry

"bgswitch"="C:\\WINDOWS\\system32\\bgswitch.exe"

[ Last edited by zouzhxi on 2006-11-23 at 02:49 AM ]
Floor 11 Posted 2006-11-23 07:06 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Good stuff! Too bad I'm using Ubuntu~~~

[ Last edited by electronixtar on 2006-11-23 at 07:10 AM ]

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 12 Posted 2006-12-05 02:22 ·  IANA 局域网IP(Private-Use)
初级用户
★★
Credits 136
Posts 59
Joined 2006-06-02 16:05
20-year member
UID 56438
Status Offline
Delete desktop wallpaper auto-switch

1. Logout component: Start >> Run >> Enter regsvr32.exe /u c:windowssystem32bgswitch.dll
2. Delete files: bgswitch.exe and bgswitch.dll under c:windowssystem32
3. Clean registry: Delete the registry [HKEY_CURRENT_USERSoftwareMicrosoftWindows CurrentVersionRun] "bgswitch"="C:\WINDOWS\system32\bgswitch.exe"
Done!!!
Floor 13 Posted 2007-04-27 18:05 ·  中国 广东 深圳 龙岗区 电信
新手上路
Credits 4
Posts 2
Joined 2007-04-27 17:10
19-year member
UID 86682
Gender Male
Status Offline
Code

color 0a
title Changing Desktop...
echo Adding registry entries...
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /d \\192.168.1.253\Network Administrator Archive$\Floating\Pictures\Dead Cat Copy.bmp /f
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
cls
Floor 14 Posted 2007-04-29 09:46 ·  中国 山东 枣庄 联通
新手上路
Credits 2
Posts 1
Joined 2007-04-29 09:13
19-year member
UID 86876
Gender Male
Status Offline
Floor 15 Posted 2007-05-04 09:47 ·  中国 广东 广州 黄埔区 电信
中级用户
★★
Credits 326
Posts 152
Joined 2007-05-04 06:16
19-year member
UID 87412
Gender Male
Status Offline
@echo off
title Automatically Change Wallpaper According to Day of Week or Specified Holiday---P Processing---by Bin(QQ:43142691) 2007-05-04
::【 Get current date file (today.ini) 】
date /t >today.ini

::Start executing corresponding commands::::::::::::::::::::::::::::::::
find "Monday" today.ini && set wallpaperFileName=Week Wallpaper\1
find "Tuesday" today.ini && set wallpaperFileName=Week Wallpaper\2
find "Wednesday" today.ini && set wallpaperFileName=Week Wallpaper\3
find "Thursday" today.ini && set wallpaperFileName=Week Wallpaper\4
find "Friday" today.ini && set wallpaperFileName=Week Wallpaper\5
find "Saturday" today.ini && set wallpaperFileName=Week Wallpaper\6
find "Sunday" today.ini && set wallpaperFileName=Week Wallpaper\7
::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
:: 【Server settings (whether to display special holidays) please set on the server】Do not modify. Otherwise, an error will occur
find "Do not enable" \\10.0.0.247\login$\Bin\Configuration File.ini && goto autoBZ
::::::::::::::::::::::::::::::::::::::::::::::::::
:: 【Special holiday table must be filled here. Otherwise, execute by day of week (holiday format is 00-00 】
find "01-01" today.ini && set wallpaperFileName=Holiday Wallpaper\01
find "03-08" today.ini && set wallpaperFileName=Holiday Wallpaper\38
find "05-01" today.ini && set wallpaperFileName=Holiday Wallpaper\51
find "05-04" today.ini && set wallpaperFileName=Holiday Wallpaper\54
find "06-01" today.ini && set wallpaperFileName=Holiday Wallpaper\61
:::::::::::::::Final executed command::::::::::::::::::::::
:autoBZ
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /d \\10.0.0.247\login$\Bin\%wallpaperFileName%.bmp /f
gpupdate /force
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
del today.ini
exit
Forum Jump: