(34) Backup & Restore Win32 App
- Mr B SOE way
- Nov 29, 2022
- 2 min read
Recently as part of recent project, a customer wants to be able to run an app from Company Portal that backs up a user profile to OneDrive then after a system reset then if the user wants to restore the backed up folder from OneDrive back to the PC. This works on both Windows 10 and Windows 11.
There are two parts of this script and both are just batch files can later be converted as a Win32 App.
Backup Script:
This can be accessed by clicking on here. Once the user profile has been backed up, it will creates a folder called "Backup" on OneDrive.
What does the backup script do:
- Favourites
- Signatures
- Outlook Settings
- Templates
- UI Settings
- Sticky Notes
- Chrome Bookmarks
- Email Signatures
- Mapped Drives
Restore Script:
This can be accessed by clicking on here.
Packaging Win32 Apps:
This can be accessed by downloading the https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool. You will need to run Command Prompt as Administrator, then CD to the path of your downloaded Intune Win32 Prep Tool sits.
Source folder: Location of where the scripts are located at.
Setup file: intune-backup.bat (Which is the backup script to OneDrive)
Output folder: Location of the source folder (optional elsewhere).

Repeat the same process for the Restore script.

Once the .intunewin has been created, it is now to create the Win32 Apps which will be uploaded to https://endpoint.microsoft.com/
Create & Deploy Win32 Apps:
Navigate to https://endpoint.microsoft.com/#view/Microsoft_Intune_DeviceSettings/AppsWindowsMenu/~/windowsApps then select Add then select App Type where it is Windows app (Win32).
Make sure to set the Install behavior as "User" for both Win32 Apps.


The detection rules will be using the .txt file to confirm it has been installed.
The application will be deployed as "Available for enrolled devices", ensure Company Portal (Online) is deployed as required to all enrolled devices.

Comentarios