In earlier posts we saw how we can deploy Office 365 Pro Plus app to client devices. We also saw how we can deploy PowerShell scripts to configure certain settings.
In this post we’ll see how we can create a simple Win32 app. This Win32 app does one simple task, Copy certain required files to target devices.
These files will be used in further configurations. Also we’ll continue to update the app with new files as and when needed.
Existing setup done:
- Two Local users created
- Azure AD Connect configured
- Seamless Single Sign-On (IE) configured
- Seamless Single Sign-On (Firefox) configured
- Hybrid Azure AD Join configured
- Intune enrollment – Domain Joined Windows 10 devices
- Azure AD Join
- Office 365 Pro Plus Application
- Sample SharePoint Team Site
- OneDrive Known Folder Migration and SharePoint library sync
- SkyDC: Machine with ADDS, DNS, DHCP role
- SkyCON: Machine where we will install Azure AD Connect
- SkyCM: Machine with Configuration Manager Current Branch
- SkyTEN1: Domain Joined Windows 10 machine
- SkyTEN2: Domain Joined Windows 10 machine
- SkyTEN3i: Domain Joined Windows 10 machine (Intune Managed)
- SkyTEN4i: Domain Joined Windows 10 machine (Intune Managed)
- SkyTEN5i: Azure AD Joined Windows 10 (Intune Managed)
- SkyTEN6i: Azure AD Joined Windows 10 (Intune Managed)
- SkyTEN7i: Azure AD Joined Windows 10 (Cloud User, Intune Managed)
- SkyTEN8i: Azure AD Joined Windows 10 (Cloud User, Intune Managed)
Create a Win32 app package
Make a list of all necessary files that you want to copy to targeted devices.
Create a folder and put all files in that folder
Create a CMD file which will copy all files to Windows folder:
copy /Y .\”Microsoft Edge.lnk” %systemRoot%\
copy /Y .\Sky366.scr %systemRoot%\
copy /Y .\Sky366BG.png %systemRoot%\
copy /Y .\Sky366LS.png %systemRoot%\
Create another folder where Win32 app will be created.
Navigate to https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool. Click on Clone or download and click on Download ZIP.
Save the file and extract the contents.
The extracted contents.
Open Command Prompt. Navigate to the folder where Win32 Content Prep Tool is extracted and execute IntuneWinAppUtil.exe
Enter relevant details and press Enter. I have used the below:
Please specify the source folder: D:\Tenants\Sky366\Apps\CopyFiles
Please specify the setup file: copyFiles.cmd
Please specify the output folder: D:\Tenants\Sky366\Apps\Win32Apps
You can see the tool executed successfully.
The Win32 App is created with extension .intunewin
Create an Win32 App in Intune
Login to Azure portal.
Navigate to Intune -> Client apps -> Apps. Click on +Add.
In App type, select Windows app (Win32).
Click on App package file – Select file.
Click on the folder icon and select the .Intunewin file
Click on App information – Configure.
Enter the details and click OK. I have used below
Name: Copy Files
Description: This App will copy the necessary files in the target device.
Publisher: Your Organization
Click on Program – Configure.
In Install command, enter the CMD file which will copy the files.
In Uninstall command, enter the CMD file which will copy the files. Note: As I am not going to use Uninstall command, I have used the same CMD file. You can create another CMD file in the same folder which will delete the files from the Windows folder and mention it here.
In Install behavior, select System.
Click on Requirements – Configure.
In Operating system architecture, select both the architecture.
In Minimum operating system, select the appropriate option.
I have selected the Windows 10 1607.
Click Detection rules – Configure.
In Rules format, select Manually configure detection rules. Click Add.
Note: if any of the files in the app exists in the Windows folder, then app is already run. So, we’ll check for one file’s existence.
In Rule type, select File.
In Path, enter %SystemRoot%
In File or folder, enter one of the filename with extension. I entered Sky366.scr.
In Detection method, select File or folder exists.
In Associated with a 32-bit app on 64-bit clients, select No.
After some time, you’ll see that the file is uploaded successfully.
Open the App again.
Navigate to Assignments.
Click on Add group.
In Assignment type, select Required.
Click on Include Groups.
Choose appropriate option.
I am making the app required for all devices.
In Client machine:
In client machine, to get the result immediately, sync the device.
After some time you’ll see the files in Windows folder.