Logon Wallpaper - automatically change w/ every logon

Page 1 of 2 12 LastLast

  1. Posts : 29
    Windows 7 Ultimate x64
       #1

    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 Computer


  2. Posts : 50
    Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
       #2

    You may want to link to this in your thread: Task Scheduler - Create New Task
      My Computer


  3. Posts : 29
    Windows 7 Ultimate x64
    Thread Starter
       #3

    Good idea. Thanks
      My Computer


  4. Posts : 50
    Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
       #4

    I also am having problems getting this to work. DO you have team viewer and could look?
      My Computer


  5. Posts : 29
    Windows 7 Ultimate x64
    Thread Starter
       #5

    Zero,

    Where are you getting hung up at?
      My Computer


  6. Posts : 50
    Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
       #6

    ltwally said:
    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 Computer


  7. Posts : 29
    Windows 7 Ultimate x64
    Thread Starter
       #7

    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 Computer


  8. Posts : 50
    Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
       #8

    ltwally said:
    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 Computer


  9. Posts : 29
    Windows 7 Ultimate x64
    Thread Starter
       #9

    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 Computer


  10. Posts : 50
    Microsoft Windows 7 Ultimate 64-bit 7601 Multiprocessor Free Service Pack 1
       #10

    ltwally said:
    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 Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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:14.
Find Us