Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Logon Wallpaper - automatically change w/ every logon


07 Nov 2011   #1

Windows 7 Ultimate x64
 
 
Logon Wallpaper - automatically change w/ every logon

My method for automatically changing the Windows 7 logon/logoff wallpaper with every logon.

Step 1: Use one of the many guides on the web to enable custom/oem logon wallpaper, such as Brink's: Log On Screen - Change


Step 2: Copy whatever JPEG images you want to use for logon/logoff wallpaper in to C:\Windows\System32\oobe\info\backgrounds
You do not need to rename them -- just so long as their file extension is JPG or JPEG they'll be fine.


Step 3: Copy the following into C:\Windows\System32\oobe\info\backgrounds\rand.vbs
Code:
'=========================================
'rand.vbs
'Random logon/logoff wallpaper generator
'Author: ltwally@gmail.com
'=========================================

Option Explicit
Dim objFSO, objFolder, objFile, colFiles
Dim min, max, result, aWallpaper(100)

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(".\")
min = 1
max = 0

Set colFiles = objFolder.Files
For Each objFile in colFiles
	If ((LCase(Right(CStr(objFile.Name), 3)) = "jpg") Or (LCase(Right(CStr(objFile.Name), 4)) = "jpeg")) Then
		If NOT (CStr(objFile.Name) = "backgroundDefault.jpg") Then
			max = max + 1
			aWallpaper(max) = CStr(objFile.Name)
		End If
	End If
Next

Randomize
result = Int((max-min+1)*Rnd+min)

objFSO.CopyFile ".\" & aWallpaper(result), ".\" & "backgroundDefault.jpg", True
*note: if you have more than 100 images, change aWallpaper(100) to a larger value, such as aWallpaper(1000).


Step 4: Create a custom task in the Task Scheduler with the following properties.


You need to set the permissions here for an administrator account that has access to C:\Windows\System32\oobe\info\backgrounds




Add arguments: C:\Windows\System32\oobe\info\backgrounds\rand.vbs
Startup in: C:\Windows\System32\oobe\info\backgrounds






It's a bit more complicated than just installing a program to do it for you... but after you get it going, it zero-management; just drop whatever images you want to use in that folder.

My System SpecsSystem Spec
.

07 Nov 2011   #2

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

You may want to link to this in your thread: Task Scheduler - Create New Task
My System SpecsSystem Spec
07 Nov 2011   #3

Windows 7 Ultimate x64
 
 

Good idea. Thanks
My System SpecsSystem Spec
.


07 Nov 2011   #4

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

I also am having problems getting this to work. DO you have team viewer and could look?
My System SpecsSystem Spec
07 Nov 2011   #5

Windows 7 Ultimate x64
 
 

Zero,

Where are you getting hung up at?
My System SpecsSystem Spec
07 Nov 2011   #6

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by ltwally View Post
Zero,

Where are you getting hung up at?
I have all the Task Scheduler setup right and I have several images in the backgrounds folder and it will not change even after a restart.
My System SpecsSystem Spec
07 Nov 2011   #7

Windows 7 Ultimate x64
 
 

You can verify that the script is functional by deleting "backgroundDefault.jpg" and then double-clicking the script to run it.

If it runs, it will copy one of your JPG/JPEG images to "backgroundDefault.jpg".

If nothing happens, then there is a problem w/ the script or with permissions.
My System SpecsSystem Spec
07 Nov 2011   #8

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by ltwally View Post
You can verify that the script is functional by deleting "backgroundDefault.jpg" and then double-clicking the script to run it.

If it runs, it will copy one of your JPG/JPEG images to "backgroundDefault.jpg".

If nothing happens, then there is a problem w/ the script or with permissions.
Okay, I have it working now. Is there a way to get it to change before windows starts? It changes when I log off and stays the same when I restart until I log off again.
My System SpecsSystem Spec
07 Nov 2011   #9

Windows 7 Ultimate x64
 
 

Check the task's Triggers. There is an option for "at startup" that might suite you.

The reason I do not do this is that I do not want any additional tasks running during system startup. The way I have this task set, it doesn't run till 15 minutes after logon.

You could fish for the shutdown event and tell it to run on that... though I'm not sure if that would work (launching a new process while the system is shutting down), or work reliably.
My System SpecsSystem Spec
07 Nov 2011   #10

Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by ltwally View Post
Check the task's Triggers. There is an option for "at startup" that might suite you.

The reason I do not do this is that I do not want any additional tasks running during system startup. The way I have this task set, it doesn't run till 15 minutes after logon.

You could fish for the shutdown event and tell it to run on that... though I'm not sure if that would work (launching a new process while the system is shutting down), or work reliably.
Setting the option to "At startup" doesn't work at all. Hmm any help?
My System SpecsSystem Spec
Reply

 Logon Wallpaper - automatically change w/ every logon




Thread Tools



Similar help and support threads for2: Logon Wallpaper - automatically change w/ every logon
Thread Forum
how to keep logon wallpaper same for all desktop backgrounds Customization
How To Change Logon Screen Background Color (not wallpaper)? Customization
Win7 .theme-file Logon-Wallpaper? Themes and Styles
Change logon wallpaper each boot Customization
Solved Logon screen, change/remove logon picture Customization
How to change Logon screen Picture frame (before logon) Customization
cannot change logon screen wallpaper Customization

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:08 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33