mirror of
https://git.steelants.cz/JonatanRek/INT_PKG_BUILDER.git
synced 2026-10-11 13:45:32 +00:00
Intune Package Builder Initialization
This commit is contained in:
commit
01137f3cb8
5 files changed
+48
No files matched your search
@@ -0,0 +1,23 @@
|
||||
$version = "v1.8.6"
|
||||
if (-not (Test-Path -Path $version -PathType Container)) {
|
||||
Invoke-WebRequest -Uri "https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/archive/refs/tags/v1.8.6.zip" -OutFile "v1.8.6.zip"
|
||||
Expand-Archive -Path "v1.8.6.zip" -Force
|
||||
Remove-Item -Path "v1.8.6.zip"
|
||||
}
|
||||
|
||||
foreach ($folder in (Get-ChildItem -Path "./apps/" )) {
|
||||
write-host $folder.Name
|
||||
$sourceFolder = $folder.FullName
|
||||
|
||||
$sourceFile = $null
|
||||
foreach ($wntrypoint in @('install.bat', 'install.ps1', '*.msi')) {
|
||||
$sourceFile = (Get-ChildItem -Path $sourceFolder -Filter $wntrypoint | Select-Object -First 1 )
|
||||
if ($null -ne $sourceFile){
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
$buildArgs = " -c ", $folder.FullName, " -s ", $sourceFile.FullName, " -s ", $folder.FullName, " -q"
|
||||
Start-Process -FilePath ('./{0}/Microsoft-Win32-Content-Prep-Tool-1.8.6/IntuneWinAppUtil.exe' -f $version) -ArgumentList "$buildArgs" -Wait
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user