Where Customization Begins 

  • Python Script: Random Login Background

 #26351  by MayikMiday
 21 Apr 2013, 19:43
I wrote this handy Python script that simply takes a random file from C:\Logons\ (a folder with a bunch of correctly formatted jpgs [less than 256kb i believe is the limit]). http://pastebin.com/QaZxmKN7

Must have OEMBackgrounds enabled, see Neuropass's guide http://tweakscene.com/viewtopic.php?f=159&t=7157

Must have Python 2.7 installed, see http://python.org/ftp/python/2.7.4/python-2.7.4.msi or select the appropriate version from http://python.org/download/ if the first link doesn't work out for you.

***Python has a set limit of characters allowed per line of code. Therefore I recommend for simplicity sake that you create a folder "C:\Logons" and dump your jpg's there. [EDIT] Your path to filename may contain up to 31 more characters than C:\Logons; so there is a bit more room to go into subfolders. Spaces and \'s count as characters.

If you setup python correctly, and saved the .py from the first link to your Startup folder, you should see psuedo-random logon wallpapers now.

General disclaimer: it is assumed that you run my script at your own risk. Please take a look at what is in the script (its like 15 lines, nothing major) for a general idea of what is going on. Bassically, it scans the C:\Logons folder and creates an array for the fullpath of each file in that folder. Then it copies and random array item and pastes it over the current defaultBackground.jpg file in your System32 path.