Copy file to workstations with Windows Intune

**If you want to deploy a file from an Azure Blob Location for Files that need changing frequently see here **

 

Seems one of the only ways to copy files to PC’s in Intune seems to be to create an MSI file to deploy them which requires a MSI packager ( Laboursome) . However, this can also be done using Windows app (Win32) container

Copy.bat File

[pastacode lang=”markup” manual=”rem%20Copy%20Files%0Acopy%20off.ini%20c%3A%5CWindows%5CSystem32%5Coff.ini%0Acopy%20BSPECIAL.DLL%20c%3A%5CWindows%5CSystem32%5CBSPECIAL.DLL%0Acopy%20BSPECIAL.DLL%20c%3A%5CWindows%5CSysWOW64%5CBSPECIAL.DLL%0Arem%20Set%20Permissions%0Aicacls%20%22c%3A%5CWindows%5CSystem32%5CBSPECIAL.DLL%22%20%2Fgrant%20Everyone%3AM%0Aicacls%20%22c%3A%5CWindows%5CSysWOW64%5CBSPECIAL.DLL%22%20%2Fgrant%20Everyone%3AM” message=”” highlight=”” provider=”manual”/]

You will need to make sure the folder exists before you copy files to it such as below , or you can use the XCOPY function instead of copy

[pastacode lang=”bash” manual=”if%20not%20exist%20C%3A%5CTemp%5CTest%20%0Amkdir%20if%20not%20exist%20C%3A%5CTemp%5CTest%20″ message=”” highlight=”” provider=”manual”/]

 

del.bat file

[pastacode lang=”markup” manual=”del%20c%3A%5CWindows%5CSystem32%5Coff.ini%0Adel%20c%3A%5CWindows%5CSystem32%5CBSPECIAL.DLL%0Adel%20c%3A%5CWindows%5CSysWOW64%5CBSPECIAL.DLL%0A” message=”” highlight=”” provider=”manual”/]

 

Next run the IntuneWinAppUtil.exe File

c:\TempPath\Intune-Win32-App-Packaging-Tool-master>IntuneWinAppUtil.exe
Please specify the source folder: F:\Config Files
Please specify the setup file: copy.bat
Please specify the output folder: C:\TempPath\BuildsoftAppps

Create a new Windows app (Win32) App in Intune , upload the copy.intunewin and use the commands below

Detection Rules

1 Star2 Stars3 Stars4 Stars5 Stars (9 votes, average: 4.78 out of 5)
Loading...