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
ltwally

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
ZeroManArmy

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
ltwally

Windows 7 Ultimate x64
 
 

Good idea. Thanks
My System SpecsSystem Spec
.


07 Nov 2011   #4
ZeroManArmy

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
ltwally

Windows 7 Ultimate x64
 
 

Zero,

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

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
ltwally

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
ZeroManArmy

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
ltwally

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
ZeroManArmy

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
Thread Forum
how to keep logon wallpaper same for all desktop backgrounds
hi there. i work on windows 7 ultimate X32 whenever i change my desktop background, my logon screen wallpaper changes to boring blue default wallpaper which i really don't like can u please help me keep it (logon screen wallpaper the one i chose) same for all the desktop backgrounds?????????
Customization
How To Change Logon Screen Background Color (not wallpaper)?
Hi all - my first post here. This site has helped me IMMENSELY with my transition from XP to 7 over the past few years. I always found exactly what I was looking for, but today I am stumped. In Windows XP, there was an option to change the logon screen background color:...
Customization
Change logon wallpaper each boot
So, I have the backroundchanger.exe from Brink's tutorial, but wondered - How can I setup an automatic wallpaper change each bootup? Say for example rotate through the images in my shared picture folder. The program in the tut doesn't seem to allow this - is there any other way? Thanks D
Customization
Logon screen, change/remove logon picture
Hi, Is there a way to remove the logon picture. or make the picture smaller. it ruins my logon wallpaper :cry: let me know!
Customization
How to change Logon screen Picture frame (before logon)
Hi there, I have a windows 7 pc in a "domain", so when you get to the initial windows 7 welcome screen (prior to logging in as a user), you get a blank transparent Picture
Customization
cannot change logon screen wallpaper
hi... i have a problem changing my logon screen wallpaper although i have use the windows 7 logon wallpaper changer.... how to reset back to default wallpaper?? help me... thanks...
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 22:42.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App