Due to group policies enforced on our systems, we can't change the background of our desktop permanently. The IE's "Set as desktop background" is working but temporarily. PS: I have got administrator privileges to my system.

  • I'm sure @Ramhound means "This action requires being an administrator on the domain." May 15, 2013 at 12:16
  • 4
    A secure domain is such an inconvenience for untrustworthy users…D’oh!
    – argentwolf
    May 15, 2013 at 12:19
  • @Ramhound he doesn't mention if he's got a local or roaming profile, it's also possible that he's got a .man roaming profile. Mandatory profiles can't make permanent changes to system configuration.
    – Ben Plont
    May 15, 2013 at 16:01

2 Answers 2


You would just find the background image file it is currently using and overwrite it, rather than trying to point your preferences at a different file.

So if your current background file is c:\windows\system\background.png, you would MAKE A BACKUP copy, background.png.bak or similar. Then you would copy the one you want to use to c:\windows\system\background.png. This will change the background for everyone who uses the computer, so you could instead make a script that copies the files on login/logout.

  • I'm not 100% sure, but I think that his profile is a NTUser.man, which is called a mandatory profile (think read-only). These profiles can't make changes to the system configuration beyond the current session.
    – Ben Plont
    May 15, 2013 at 15:58
  • Could be right, but I assumed when he said he was an admin, he could modify system files.
    – MattPark
    May 15, 2013 at 16:01
  • yeah, that's weird.
    – Ben Plont
    May 15, 2013 at 16:04

I have the same situation here. I've done it in a bit different way + does not require administrator privileges:

  1. Create a new directory: C:\Wallpaper

  2. Move to there your wallpaper, resize it to your screen dimensions and rename it to background.jpg. To resize the image without any 3rd party app, open background.jpg file with MS Paint, press CTRL+W (to resize), deselect "Keep aspect ratio", select "Pixels" radio button and adjust your image according to your desktop size.

  3. Create new file in that directory named wallpaper.bat with the following content (note you can change 30 to a higher number if it fails to set on boot. For example: 60 or 90):

timeout /t 30 /nobreak > NUL
Call background.xlsm
  1. Create wallpaper.vbs file in the same directory with the following content:
Set WshShell = CreateObject("WScript.Shell" ) 
WshShell.Run chr(34) & "C:\Wallpaper\wallpaper.bat" & Chr(34), 0 
Set WshShell = Nothing 
  1. Open MS Excel (later you will save it there, but now just follow the instructions), Press Alt+F11 and Visual Basic for Applications will open. On the left side you should see project browser, so double click on ThisWorkbook and paste following content:
Private Sub Workbook_Open()
     If (ThisWorkbook.Name = "background.xlsm") Then
          Call changeWallpaper("C:\Wallpaper\background.jpg")
          Application.DisplayAlerts = False
     End If
End Sub
  1. In the same excel file, right click on any of the items in the project browser, then "Insert", then "Module" and paste the following code:
Option Explicit

Public Declare Function SystemParametersInfo Lib "user32" Alias
"SystemParametersInfoA" _
                    (ByVal uAction As Long, ByVal uParam As Long, _
                     ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long

Public Const SPI_SETDESKWALLPAPER = 20 Public Const

Public Sub changeWallpaper(location As String)

     Dim strImagePath As String
     strImagePath = location

End Sub
  1. Make sure that macros are always available without confirmation to enable them for this file. Save this file as macros enabled Excel file with the extension xlsm (it is necesarry to name it background.xlsm):
  1. Close and open xlsm Excel file. If wallpaper is being set - you are done. If not - check macros security. Maybe you need to add that excel file to a whitelist in Excel macros security settings? For me - it works. If you still can't get it working, - you are out of luck.

  2. Set wallpaper on boot - in windows startup directory place the shortcut of wallpaper.vbs file. To make a shortcut, right click on wallpaper.vbs file and click "Create shortcut". To open startup directory, go to Start --> All Programs --> startup folder, then right click on it and "Open". Move your created shortcut to that startup directory.

NOTE 1: After booting up, 30secs will pass and your wallpaper should be set successful. Without the timer (30secs) the excel file will give error for some reason.

NOTE 2: To edit the Excel xlsm file, rename it to any other name (e.g. bbackground.xlsm) and open. When you done modifying content, save it and rename back to background.xlsm.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .