Set Desktop & Lock Screen Wallpaper using Intune Win32 App

In my previous blog post, we have learnt the steps to configure desktop and lock screen wallpaper on Windows 10/11 devices using Intune Device restriction template which requires the wallpaper files to be stored in a publicly accessible location.

In this blog post, we will use Win32 app deployment method for configuring desktop and lock screen wallpaper. For this method, there is no requirement of storing wallpaper files in a public location, instead we will copy the files on the target device first and then set the wallpapers using a Settings catalog policy.

1. Copy Wallpaper Files and Create Powershell Scripts

  1. Log in to any Windows computer, create a folder, and copy Desktop and Lock screen wallpapers. Ensure the wallpaper files are in JPEG, PNG, or BMP format.
  • You can name the folder anything you like; I have created a folder called DeployWallpapers and copied DesktopWallpaper.jpg and LockScreenWallpaper.jpg files at this location.
  1. Create two PowerShell scripts called InstallWallpapers.ps1 and UninstallWallpapers.ps1 using below code. Change the wallpaper file names in the script to match those stored in the DeployWallpapers folder.

Please note that if you do not want to set the lock screen wallpaper, then you do not have to copy the lock screen wallpaper file in deploywallpapers folder and also do not have to copy it on the target devices and same goes for desktop wallpaper as well, therefore modify the scripts accordingly.

Note

InstallWallpapers.ps1

Copy-Item -Path .\DesktopWallpaper.jpg -Destination C:\Windows\Web\Wallpaper -force
Copy-Item -Path .\LockScreenWallpaper.jpg -Destination C:\Windows\Web\Wallpaper -force

UninstallWallpapers.ps1

Remove-Item C:\Windows\Web\Wallpaper\DesktopWallpaper.jpg -force
Remove-Item C:\Windows\Web\Wallpaper\LockScreenWallpaper.jpg -force
Copy Wallpaper Files and Create Powershell Scripts

2. Create an IntuneWin File

We will use Win32 app deployment method, which requires packaging the contents into IntuneWin file format. Let’s check the steps:

Download IntuneContentPrepTool
  • We will need a folder where the Intunewin file will be generated. You can choose any existing folder or create a new folder. I have created a folder C:\Output.
  • Run IntunewinAppUtil.exe and provide Source Folder, Setup File, Output Folder, and Catalog Folder Information.
    • Source Folder: Enter the folder where wallpapers and Powershell scripts are stored. In my case, it’s G:\DeployWallpapers.
    • Setup File: Provide the file name to execute when the Win32 app is deployed on the target devices. We will provide InstallWallpapers.ps1.
    • Output folder: C:\Output.
    • Catalog folder: Type and press Enter.
Create .intunewin file
Create .intunewin file
  • .Intunewin file was created successfully in the C:\Output folder.
Intunewin file created successfully

If you find any issues with creating Intunewin file, you can refer to the link: How to Create an IntuneWin file.

More Information

3. Create Win32 App deployment

Next step is to create a Win32 app deployment from Intune admin center using the Intunewin file we created in the previous step. This step will copy the wallpapers on the target devices.

  • Sign in to the Intune admin center >  Apps All Apps.
  • Click on + Add and Select Windows app (Win32) from the app type.
  • App Information: Click on Select app package file and browse to the Intunewin file.
Create Win32 App deployment for copying wallpapers
Create Win32 App deployment for copying wallpapers
  • Program: Provide the install command and uninstall command.

Install Command

powershell.exe -Executionpolicy Bypass -File .\InstallWallpapers.ps1

Uninstall Command

powershell.exe -Executionpolicy Bypass -File .\UninstallWallpapers.ps1
  • Installation time required (min): Keep default.
  • Allow available uninstall: No
  • Install behaviour: System
  • Device restart behaviour: No specific action
Provide Install and Uninstall commands
Provide Install and Uninstall commands
  • Requirements: You can specify the requirements that devices must meet to deploy the app. If your devices mix 32-bit and 64-bit types, check the boxes for 32-bit and 64-bit in the operating system architecture drop-down. Otherwise, go with 64-bit. I have selected the options below.
    • Operating System Architecture: Select 64-bit
    • Minimum operating system: Select the minimum operating system needed to install the app, such as Windows 10 1607.
  • Detection rules: We will add two detection rules, one for the desktop wallpaper file and the second for the lock screen wallpaper file. If you are deploying only one of these wallpapers, provide the detection rule only for the relevant one.
    • Rules Format: Select Manually configure detection rules
    • Rule Type: File
    • Path: C:\Windows\Web\Wallpaper\
    • File or Folder: DesktopWallpaper.jpg
    • Detection Method: File or Folder Exits
    • Associated with a 32-bit app on 64-bit clients: No
Detection rule for desktop wallpaper
Detection rule for desktop wallpaper
  • Rule Type: File
  • Path: C:\Windows\Web\Wallpaper\
  • File or Folder: LockScreenWallpaper.jpg
  • Detection Method: File or Folder Exits
  • Associated with a 32-bit app on 64-bit clients: No
Detection rule for lock screen wallpaper
Detection rule for lock screen wallpaper
  • Two detection rules were created successfully. Click on Next to proceed to the next step.
Detection rules created successfully
Detection rules created successfully
  • Dependencies: Click Next.
  • Supersedence: Click Next.
  • Assignments: Click on Add group to add an Entra security group containing users or devices.
  • Review + create: Review the deployment summary and click on Create.

Monitor App Deployment Progress

Intune admin center > Apps > All apps. Click on the deployment and check the Overview page to show the deployment status.

4. Create a Device Configuration Profile

Now that the wallpaper files are copied on the target devices, we can configure desktop and lock screen wallpaper by creating a device configuration profile.

  • Sign in to the Intune admin center >Devices Configuration > Create > New Policy.
  • Platform: Windows 10 and later.
  • Profile type: Settings catalog.
  • Basics: Provide a Name and Description of the profile.
Create Device Configuration Profile for configuration of desktop and lock screen wallpapers
  • Configuration settings: Click on + Add settings and search for desktop wallpaper in the settings picker. Under the Administrative Templates\Desktop\Desktop category, you will find Desktop Wallpaper (User). Select it to add it under Configuration settings.
Select Desktop Wallpaper (User) setting
Select Desktop Wallpaper (User) setting
  • Search for the default lock screen in the settings picker. Under the Administrative Templates\Control Panel\Personalization category, you will find the setting Force a specific default lock screen and login image. Select it to add it under Configuration settings. Close the settings picker.
Select Force a specific default lock screen and logon image setting
Select Force a specific default lock screen and logon image setting
  • Force a specific default lock screen and logon image: Enabled
  • Path to lock screen image: (Device): C:\Windows\Web\Wallpaper\LockScreenWallpaper.jpg
  • Turn off fun facts, tips, tricks, and more on lock screen (Device): Enable/disable it depending upon your requirement.
  • Wallpaper Name: (User): C:\Windows\Web\Wallpaper\DesktopWallpaper.jpg
  • Wallpaper Style: (User): Select Wallpaper style according to your requirements.
  • Desktop Wallpaper (User): Enabled
Provide desktop and lock screen wallpaper paths
Provide desktop and lock screen wallpaper paths
  • Scope tags: Click Next.
  • Assignments: Click on Add group to add an Entra security group containing users or devices.
  • Review + create: Review the deployment and click on Create.

Sync Intune Policies

The device check-in process might not begin immediately. If youโ€™re testing this policy on a test device, you can manually kickstart Intune sync from the device itself or remotely through the Intune admin center.

Alternatively, you can use PowerShell to force the Intune sync on Windows devices. Restarting the device is another way to trigger the Intune device check-in process.

Monitor Policy Deployment Progress

  • Sign in to the Intune admin centerDevicesConfiguration.
  • Choose the Device Configuration profile you want to work with, and at the top of the page, youโ€™ll see a quick view of the Success, Failure, Conflict, Not Applicable, and In Progress status.
  • Click on View report to access more detailed information.

End User Experience

Win32 app deployment will copy the wallpaper files to C:\Windows\Web\Wallpaper.

Desktop and lock screen wallpapers files copied on the target device using Intune
Desktop and lock screen wallpapers files copied on the target device

Device configuration profile will configure the desktop and lock screen wallpapers on target devices. Below screenshot confirms that the desktop wallpaper has been successfully configured on the device.

Desktop wallpaper configured successfully using Intune
Desktop wallpaper configured successfully

Below screenshot confirms that the lock screen and logon image wallpaper have been configured on the device successfully.

Lock screen wallpaper configured successfully using Intune
Lock screen wallpaper configured successfully

Can Users Change Desktop & Lock Screen background after applying this policy?

End users cannot change desktop and lock screen wallpaper after configuring it via Intune. When users go to the Settings app > Personalization, options for changing the background will be greyed out.

Desktop background settings in the settings app - Greyed out
Desktop background settings in the settings app – Greyed out

Updating Desktop and Lock Screen Wallpaper

After configuring a desktop and lock screen wallpaper on the target devices, you may be required to update the wallpapers or replace them with new ones. Let’s say the marketing team sent you a new desktop wallpaper and a new lock screen wallpaper to apply. You can follow the steps below to replace the wallpaper’s target devices.

1. Copy New Wallpaper files and Update Powershell scripts

You can use the same folder for the previous deployment or create a new one. Copy the new desktop and lock screen wallpapers into this folder. I recommend appending a version number after the file names, such as V2, V3, V4, etc., for a consistent naming convention.

I have copied two new wallpaper files called DesktopWallpaperV2.jpg and LockScreenWallpaperV2.jpg. Ensure the file name is not as previously deployed; this could be easily managed when you append version numbers to the end of the file names. The next new wallpaper files could be DesktopWallpaperV3.jpg, LockScreenWallpaperV3.jpg, etc.

We need to update the name of the new wallpaper files in the PowerShell script files. The new wallpaper file names are DesktopWallpaperV2.jpg and LockScreenWallpaperV2.jpg. Ensure that it’s updated in both the PowerShell scripts below:

InstallWallpapers.ps1

Copy-Item -Path .\DesktopWallpaperV2.jpg -Destination C:\Windows\Web\Wallpaper -force
Copy-Item -Path .\LockScreenWallpaperV2.jpg -Destination C:\Windows\Web\Wallpaper -force

UninstallWallpaper.ps1

Remove-Item C:\Windows\Web\Wallpaper\DesktopWallpaperV2.jpg -force
Remove-Item C:\Windows\Web\Wallpaper\LockScreenWallpaperV2.jpg -force

2. Create IntuneWin File

Recreate .Intunewin file to deploy new desktop and lock screen wallpaper images on the target devices. Please refer to the previous section of this blog post for creating an Intunewin file. If you are facing any issues creating it, refer to the link: How to Create an IntuneWin file.

Recreate IntuneWin file
Recreate IntuneWin file

3. Update Win32 App Deployment

Now that the Intunewin file has been created, which contains our new desktop and lock screen wallpaper files and updated Powershell scripts, Let’s refresh the existing Win32 app deployment. You do not need to create a new Win32 app deployment; update the existing one we used for deploying the wallpaper files and replace the Intunewin file.

  • Sign in to the Intune admin centerApps All Apps.
  • Open the existing Win32 app package we created earlier.
  • Go to Properties and click on the Edit button next to App Information.
  • Click on the existing Intunewin file link to upload the new one. Click on the OK button.
  • Go to the Detection rules tab and update the new file names for Desktop and Lock Screen wallpapers.
  • After updating the Intunewin file and the detection rules, click the Review + Save button to save the deployment.

4. Update Device Configuration Profile

The last step is to update the desktop and lock screen wallpaper file names in the device configuration profile. Let’s check the steps:

  • Sign in to the Intune admin center > Devices Configuration.
  • Open the existing device configuration profile we created earlier.
  • Click on Edit next to Configuration settings.
  • Update the new desktop and lock screen wallpaper file names and click the Review + Save button.

End User Experience

You can restart your device or wait for the next Intune device check-in process. As you can see from the screenshot below, our new desktop and lock screen wallpaper files are copied successfully to the C:\Windows\Web\Wallpaper folder.

New Desktop Wallpaper

New Lock Screen Wallpaper

Other Settings

You can configure a few other optional wallpaper settings from the Settings catalog. Depending on your requirements, you may use these options. You can search for these settings in the settings picker and find more information.

  • Allow only bitmapped wallpaper (User).
  • Do not display the lock screen.
  • Prevent changing lock screen and logon image.
  • Prevent enabling lock screen camera.
  • Prevent enabling lock screen slide show.
  • Turn off app notifications on the lock screen.
  • Turn off toast notifications on the lock screen (User).

12 thoughts on “Set Desktop & Lock Screen Wallpaper using Intune Win32 App”

  1. I followed the instructions you outlined in your blog post, but encountered an issue where, instead of applying the wallpaper as per the Intune policy, the device defaulted to a solid black color. This was tested on a Windows 10 Enterprise system. Could you provide any guidance on how to troubleshoot this? Thank you!

    Reply
    • Please copy the wallpapers first and then configure wallpaper locations. This could be if the wallpapers are not copied on the target devices. Could you please check this and make sure the wallpaper files are there at C:\Windows\Web\Wallpaper.

      Reply
      • same issue here, followed your exact steps and the images do not show up in C:\Windows\Web\Wallpaper.

        Screen is set to a black screen now.

        Reply
        • @John, its issue of Windows version, I have same issue with my all Microsoft Windows 10/11 Busineess Edition.

          Reply
  2. Works really well when doing auto pilot with pre-provisioning.
    Set the copy win32 app to the device group so the files are available on the device.
    When the user eventually logs in the config profile find them and configures both lock screen and wallpaper.
    Follow the instructions to the letter.

    Well done Sir

    Reply
  3. I have followed the step provided, and the images transferred, and the policy worked for the desktop background but not for the lock screen.

    Reply
  4. Here, in my customer, they have 365 Business Premium. Each user has Intune PLan 1 inside their SKU. All have W11 Pro and converted to Windows 11 Business because of 365 SKU. These 2 policies works!

    Reply

Leave a Comment