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!
Originally posted by qq43142691 at 2007-5-4 09:47 AM:
@echo off
title 按星期或指定节日自动更改壁纸---P处理---by 彬(QQ:43142691) 2007-05-04
::
date /t >today.ini
::Start executing...
Originally posted by sdzztz at 2007-4-29 09:46 AM:
AXzx
@echo off&setlocal EnableDelayedExpansion
title Automatically Change Wallpaper According to Day of the Week or Specified Holiday---P Processing---by Bin(QQ:43142691) %date%
::****************************************************************************
set server_path=c:\2
set time_server=10.0.0.247
::****************************************************************************
set y=%date:~0,-10%
set d=%date:~8,-4%
set week=%date:~-3%
set month=%date:~5,-7%
set day=%date:~8,-3%
set today_date=today.ini
set n=0
set hour=%time:~0,2%
set minute=%time:~3,2%
set second=%time:~6,2%
if %hour% GEQ 0 goto midnight
goto afternoon
:midnight
if %hour% GEQ 5 goto morning
set current_period=midnight
goto display
:morning
if %hour% GEQ 10 goto noon
set current_period=morning
goto display
:noon
if %hour% GEQ 14 goto afternoon
set current_period=noon
goto display
:afternoon
if %hour% GEQ 18 goto evening
set current_period=afternoon
goto display
:evening
if %hour% GEQ 0 goto midnight
set current_period=evening
:display
set current_time_is=%current_period%%hour% o'clock %minute% minutes %second% seconds
set today_date_is=%y% year %month% month %d% day %current_time_is%
::***********************************************************************
echo %month%%day% %week%>%today_date%
find "①=不排除" %server_path%\exclude_machines.ini && goto initialization
find "%computername%" %server_path%\configuration_file.ini && goto initialization
exit
:initialization
find "②=不随机" %server_path%\configuration_file.ini && goto skip_random
set /a x=%random%%%100+1
set wallpaper_file_name=skip_random_wallpaper\%x%
goto change_wallpaper
:skip_random
set /a n+=1
set week_wallpaper_file_name=week_wallpaper
set holiday_wallpaper_file_name=holiday_wallpaper
for /f "tokens=2" %%F in (%today_date%) do set %week_wallpaper_file_name%\%%F
find "③=不启用" %server_path%\configuration_file.ini && goto change_wallpaper
for /f "tokens=1" %%i in (%today_date%) do set %holiday_wallpaper_file_name%\%%i
:change_wallpaper
if %n% EQU 3 goto complete
if not exist %server_path%\%wallpaper_file_name%.bmp goto skip_random
set regadd=reg add "HKCU\Control Panel\Desktop
%regadd%" /v TileWallpaper /d "0" /f
%regadd%" /v Wallpaper /d "%server_path%\%wallpaper_file_name%.bmp" /f
%regadd%" /v WallpaperStyle /d "2" /f
gpupdate /force
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
del %today_date%
find "④=不提示" %server_path%\configuration_file.ini && goto complete
set program_name=systempp.exe
set system_address=%windir%\system32\
set information_stay_time=12
find "%computername%" %server_path%\configuration_file.ini>%system_address%\local_features.ini
for /f "skip=2 tokens=2" %%k in (%system_address%\local_features.ini) do set area=%%k
goto %area%
:main_battle_area
set area=main_battle_area
goto complete_area
:game_area
set area=game_area
goto complete_area
:video_area
set area=video_area
goto complete_area
:leisure_area
set area=leisure_area
goto complete_area
:card_area
set area=card_area
:complete_area
for /f %%a in ("%time:~0,-9%") do set current_time=%%a
if %current_time% GEQ %information_stay_time% goto 3_yuan else
goto 2_yuan
exit
::******************************************************
:2_yuan
if %area% NEQ card_area goto not_expensive
set cost=3_yuan
goto start_bubble
:not_expensive
set cost=2_yuan
goto start_bubble
::******************************************************
:3_yuan
if %area% NEQ card_area goto not_expensive_
set cost=3.5_yuan
goto start_bubble
:not_expensive_
set cost=3_yuan
::******************************************************
:start_bubble
set xy=%area%%computername%
set title=%today_date_is% Welcome to XXX Internet Cafe
set prompt_content=You are client machine , currently charging:%cost%/hour
set icon_type=3
if exist %system_address%\%program_name% del %system_address%\%program_name%
copy %server_path%\%program_name% %system_address%\
start %system_address%\%program_name% ;%system_address%\ie.ico;;%title%;;%prompt_content%;;%icon_type%;;%information_stay_time%;
:complete
net time \\%time_server% /set /y
net use * /del /y
exit
This is the server-side configuration file, please place it on the server side
*****************************************************************
【Here set whether to specify the computer to execute the following program】 Keywords
①=Do not exclude
*****************************************************************
【Here set whether to random】 Keywords
Whether to display special holidays
②=Do not random
*****************************************************************
【Here set whether to enable special holidays】 Keywords
Whether to display special holidays
③=Do not enable
*****************************************************************
【Here set whether to enable special holidays】 Keywords
Whether to display special holidays
④=Do not prompt
*****************************************************************
The following are the computer names that specify the computer to change the wallpaper
*****************************************************************
Computer name Area number
A001 Main battle area
A002 Main battle area
A003 Main battle area
A004 Main battle area
A005 Main battle area
A006 Main battle area
A007 Main battle area
A008 Main battle area
A009 Main battle area
A010 Main battle area