![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-13 03:08 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » Change desktop background |
| Printable Version 11,909 / 30 |
| Floor1 chainliq | Posted 2006-11-22 12:31 |
| 高级用户 Posts 244 Credits 635 From 广西贵港 | |
|
Excuse me, how to achieve changing the desktop background with batch processing?
|
|
| Floor2 redtek | Posted 2006-11-22 22:08 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
) 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~:) |
|
| Floor3 chainliq | Posted 2006-11-22 22:12 |
| 高级用户 Posts 244 Credits 635 From 广西贵港 | |
|
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!
|
|
| Floor4 redtek | Posted 2006-11-22 22:15 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
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 : )
|
|
| Floor5 redtek | Posted 2006-11-22 22:19 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
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"? |
|
| Floor6 9527 | Posted 2006-11-22 22:47 |
| 银牌会员 Posts 438 Credits 1,185 From 北京 | |
|
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 |
|
| Floor7 zouzhxi | Posted 2006-11-23 00:11 |
| 中级用户 Posts 177 Credits 430 From 广东深圳 | |
|
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. Attachments 微软出品“桌面壁纸自动换”.rar (74.37 KiB) |
|
| Floor8 eech | Posted 2006-11-23 01:34 |
| 高级用户 Posts 346 Credits 906 | |
|
"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````````` |
|
| Floor9 redtek | Posted 2006-11-23 01:39 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
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 ] |
|
| Floor10 zouzhxi | Posted 2006-11-23 02:46 |
| 中级用户 Posts 177 Credits 430 From 广东深圳 | |
|
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 ] |
|
| Floor11 electronixtar | Posted 2006-11-23 07:06 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
Good stuff! Too bad I'm using Ubuntu~~~
[ Last edited by electronixtar on 2006-11-23 at 07:10 AM ] |
|
| Floor12 vlq5299 | Posted 2006-12-05 02:22 |
| 初级用户 Posts 59 Credits 136 | |
|
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!!! |
|
| Floor13 mozhe | Posted 2007-04-27 18:05 |
| 新手上路 Posts 2 Credits 4 | |
|
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 |
|
| Floor14 sdzztz | Posted 2007-04-29 09:46 |
| 新手上路 Posts 1 Credits 2 | |
| Floor15 qq43142691 | Posted 2007-05-04 09:47 |
| 中级用户 Posts 152 Credits 326 | |
|
@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 |
|
| 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |