Skip to content

Commit

Permalink
Add intunewin detection
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronparker committed Jun 28, 2024
1 parent 484bb7f commit 8cb1983
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
20 changes: 13 additions & 7 deletions New-Win32Package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,20 @@ process {
}

#region Create the intunewin package
Write-Msg -Msg "Create intunewin package in: '$Path\output'"
$params = @{
SourceFolder = $SourcePath
SetupFile = $Manifest.PackageInformation.SetupFile
OutputFolder = $OutputPath
Force = $true
if ($Result.FullName -match "\.intunewin$") {
Write-Msg -Msg "Copy downloaded intunewin file to: '$Path\output'"
Copy-Item -Path $Result.FullName -Destination $OutputPath -Force
}
else {
Write-Msg -Msg "Create intunewin package in: '$Path\output'"
$params = @{
SourceFolder = $SourcePath
SetupFile = $Manifest.PackageInformation.SetupFile
OutputFolder = $OutputPath
Force = $true
}
$IntuneWinPackage = New-IntuneWin32AppPackage @params
}
$IntuneWinPackage = New-IntuneWin32AppPackage @params

# Get the package file
$PackageFile = Get-ChildItem -Path $OutputPath -Recurse -Include "*.intunewin" -ErrorAction "SilentlyContinue"
Expand Down
2 changes: 1 addition & 1 deletion packages/App/ImageCustomise/App.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Application": {
"Name": "ImageCustomise",
"Filter": "Get-EvergreenAppFromApi -Name \"stealthpuppyWindowsCustomisedDefaults\" | Where-Object { $_.Type -eq \"zip\" } | Select-Object -First 1",
"Filter": "Get-EvergreenAppFromApi -Name \"stealthpuppyWindowsCustomisedDefaults\" | Where-Object { $_.Type -eq \"intunewin\" } | Select-Object -First 1",
"Title": "Windows Customised Defaults",
"Language": "en-US",
"Architecture": "x64"
Expand Down
3 changes: 3 additions & 0 deletions scripts/Update-PackageJson.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ foreach ($ManifestJson in $ManifestList) {
$Manifest.PackageInformation.SetupFile = $SetupFile -replace "%20", " "
$Manifest.Program.InstallCommand = $Manifest.Program.InstallTemplate -replace "#SetupFile", $SetupFile -replace "%20", " "
}
elseif ($AppUpdate.URI -match "\.intunewin$") {
# Do nothing because the download is already in intunewin format
}
else {
if ([System.Boolean]($AppUpdate.PSobject.Properties.name -match "Filename")) {
$Manifest.PackageInformation.SetupFile = $AppUpdate.Filename -replace "%20", " "
Expand Down

0 comments on commit 8cb1983

Please sign in to comment.