Set Desktop & Lock Screen Wallpaper using Intune Win32 App

In my previous blog post, we discussed the steps to set Desktop and lock screen Wallpaper on Windows devices using the Device Restrictions template, which utilizes wallpaper files stored in a publicly accessible location.

However, there could be a scenario when you do not want to copy the wallpaper files to a public location; in that case, you can use the Win32 app to copy the wallpaper and lock screen files on the devices first and use Intune device configuration profile to point desktop and lock screen wallpaper to the copied files.

This method works with Windows 10/11 Enterprise and Windows 10/11 Pro versions.

Using the Intune admin center, I will demonstrate how to configure desktop and lock screen wallpaper on Windows 10/11 devices. We will also explore other optional wallpaper and lock screen settings you can configure.

How to Set Desktop Wallpaper on macOS using Intune

Step-by-Step guide

Step 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. Please 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 with the contents below. 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
Copy Wallpaper Files and Create Powershell Scripts

Step 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
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
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

Step 3: Create Win32 App deployment

The 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.
  • Click on Apps and then click on 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. Provide Information in the mandatory fields below. The rest of the fields are optional but useful for application documentation and troubleshooting issues. For example:

  • Name: Copy Desktop and Lock screen wallpapers
  • Description: Provide a helpful description.
  • Publisher: Provide the publisher name, e.g., Microsoft
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. You can also click on Add all users or Add all devices.

Review + create

Review the deployment and click on Create.

Monitor App Deployment progress

You can follow the below steps to monitor the installation:

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

Step 4: Create Device Configuration Profile

The last step is to create a device configuration profile to configure the desktop and lock screen wallpaper locations. Let’s check the steps:

  • Sign in to the Intune admin center.
  • Click on Devices Configuration > Create > New Policy.
  • Platform: Windows 10 and later.
  • Profile type: Settings catalog.

Basics

Provide a Name and Description of the profile. For Example:

  • Name: Configure desktop and lock screen wallpaper locations
  • Description: This policy will configure desktop and wallpaper locations on target devices/users.
Create Device Configuration Profile for configuration of desktop and lock screen wallpapers
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.

Specifies the desktop background (“wallpaper”) displayed on all users’ desktops. This setting lets you specify the wallpaper on users’ desktops and prevents users from changing the image or its presentation. The wallpaper you specify can be stored in a bitmap (*.bmp) or JPEG (*.jpg) file. To use this setting, type the fully qualified path and name of the file that stores the wallpaper image. You can type a local path, such as C:\Windows\web\wallpaper\home.jpg or a UNC path, such as \\Server\Share\Corp.jpg. If the specified file is not available when the user logs on, no wallpaper is displayed. Users cannot specify alternative wallpaper. You can also use this setting to specify that the wallpaper image be centered, tiled, or stretched. Users cannot change this specification. If you disable this setting or do not configure it, no wallpaper is displayed. However, users can select the wallpaper of their choice. Also, see the “Allow only bitmapped wallpaper” in the same location, and the “Prevent changing wallpaper” setting in User Configuration\Administrative Templates\Control Panel. Note: This setting does not apply to remote desktop server sessions.

About Desktop Wallpaper (User) policy setting
Select Desktop Wallpaper (User) setting
Select Desktop Wallpaper (User) setting
  • If you are configuring a default lock screen and logon image for users, 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.

This setting allows you to force a specific default lock screen and logon image by entering the path (location) of the image file. The same image will be used for both the lock and logon screens. This setting lets you specify the default lock screen and logon image shown when no user is signed in, and also sets the specified image as the default for all users (it replaces the inbox default image). To use this setting, type the fully qualified path and name of the file that stores the default lock screen and logon image. You can type a local path, such as C:\Windows\Web\Screen\img104.jpg or a UNC path, such as \\Server\Share\Corp.jpg. This can be used in conjunction with the “Prevent changing lock screen and logon image” setting to always force the specified lock screen and logon image to be shown. Note: This setting only applies to Enterprise, Education, and Server SKUs.

About Force a specific default lock screen and logon image policy setting
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. You can also click on Add all users or Add all 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 Configuration Policy deployment progress

To monitor the deployment progress of a Device configuration profile, follow the below steps:

  • Sign in to the Intune admin center.
  • Click on Devices and then select Configuration.
  • 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

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

Desktop wallpaper configured successfully using Intune
Desktop wallpaper configured successfully

The screenshot below 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

FAQs

Can User change the Desktop & Lock Screen background after applying this policy?

End users can not change the 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 the 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 your 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.

Step 1: Copy the 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

Step 2: Create IntuneWin File

We must recreate the Intunewin file to deploy the new desktop and lock screen wallpaper images on the target devices.

I will not go into the details of creating the Intunewin file again. You can use the same steps to create an Intunewin file, provided at the beginning of the blog post. If you have issues creating an IntuneWin file, refer to the link: How to Create an IntuneWin file.

Recreate IntuneWin file
Recreate IntuneWin file

Step 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 center.
  • Click on Apps and then click on 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.

Step 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.
  • Click on 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)

3 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

Leave a Comment