这是办公室恶作剧的一部分,当我们忘记锁上电脑并离开时(当然是出于安全原因),我们会互相更改背景,而我们的一位同事非常冷酷无情,他从不离开电脑,也不会将电脑解锁。那么有谁知道是否有办法使用保存在他可以访问的网络驱动器上的照片来执行此操作?
答案1
您只需要一个批处理脚本来更改注册表中的相应值,并让用户单击该文件。我没有测试它,但我找到了一些你可以尝试:
@ECHO OFF
:: Written by Eric Husband
:: 7/10/2009
:: copies the wallpaper from a location into the proper directory and as the proper file name. DO NOT CHANGE THE DESTINATION FILE NAME.
copy "\\ehusband-x1\ERIC\wallpaper1.bmp" "C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\wallpaper1.bmp"
:: Adds the necessary Registry values, in case this person is using a System Wallpaper. If they've already customized their wallpaper, the following lines are not necessary. They won't hurt though.
REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\wallpaper1.bmp"
:: Change the last number in the following line to a 0 if you want to center the bitmap on the desktop. Change the last number in the following line to a 2 if you want to stretch the bitmap vertically and horizontally to fit the desktop.
REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 2
:: Change the last number in the following line to a 0 to not tile the image; setting it to a 1 Tiles it.
REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 0
:: The following line refreshes the desktop.
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
:: The following line Locks the workstation.
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, LockWorkStation