From 8c76db3e09e234f8a04b93a82953d1f67c8bc797 Mon Sep 17 00:00:00 2001 From: Jan-BaptistVandeuren Date: Tue, 20 Feb 2024 11:53:19 +0100 Subject: [PATCH 1/3] Update New-Win32App.ps1 C:\ADOAgent\_work\1\s\Scripts\New-Win32App.ps1 : Cannot validate argument on parameter 'FilePath'. Cannot bind argument to parameter 'Path' because it is an empty string. "Temporary" workaround, makes it so that the intunewinapputil.exe is always found since it is in $env. it is not a good long term solution but at least it gets everything working again. I will need someone with a better grasp to fix this in a more long term manner. --- Scripts/New-Win32App.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/New-Win32App.ps1 b/Scripts/New-Win32App.ps1 index dd29c35..e647e35 100644 --- a/Scripts/New-Win32App.ps1 +++ b/Scripts/New-Win32App.ps1 @@ -170,6 +170,7 @@ Process { # Create required .intunewin package from source folder Write-Output -InputObject "Creating .intunewin package file from source folder" + Invoke-WebRequest -URI "https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/raw/1a00a2a786de646c5fc46d6e1b79988c636e764e/IntuneWinAppUtil.exe" -outfile "$env:TEMP\IntuneWinAppUtil.exe" $IntuneAppPackage = New-IntuneWin32AppPackage -SourceFolder $SourceFolder -SetupFile $AppData.PackageInformation.SetupFile -OutputFolder $OutputFolder # Create default requirement rule @@ -594,4 +595,4 @@ Process { Write-Output -InputObject "Failed to locate required $($AppsPublishListFileName) file in build artifacts staging directory, aborting pipeline" Write-Output -InputObject "##vso[task.setvariable variable=shouldrun;isOutput=true]false" } -} \ No newline at end of file +} From a0454fd1caec6c1f400b2083a901b4ba5666dbd2 Mon Sep 17 00:00:00 2001 From: Jan-BaptistVandeuren Date: Sun, 25 Feb 2024 03:01:23 +0100 Subject: [PATCH 2/3] Update New-Win32App.ps1 sanitized the string for a more readable download link --- Scripts/New-Win32App.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/New-Win32App.ps1 b/Scripts/New-Win32App.ps1 index e647e35..992fd00 100644 --- a/Scripts/New-Win32App.ps1 +++ b/Scripts/New-Win32App.ps1 @@ -170,7 +170,7 @@ Process { # Create required .intunewin package from source folder Write-Output -InputObject "Creating .intunewin package file from source folder" - Invoke-WebRequest -URI "https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/raw/1a00a2a786de646c5fc46d6e1b79988c636e764e/IntuneWinAppUtil.exe" -outfile "$env:TEMP\IntuneWinAppUtil.exe" + Invoke-WebRequest -URI "https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/raw/master/IntuneWinAppUtil.exe" -outfile "$env:TEMP\IntuneWinAppUtil.exe" $IntuneAppPackage = New-IntuneWin32AppPackage -SourceFolder $SourceFolder -SetupFile $AppData.PackageInformation.SetupFile -OutputFolder $OutputFolder # Create default requirement rule From 77acbd2c125c8a5d533dfe1774cf77321b0d2e28 Mon Sep 17 00:00:00 2001 From: Jan-BaptistVandeuren Date: Mon, 26 Feb 2024 11:16:03 +0100 Subject: [PATCH 3/3] undoing last changes apparently it introduced a bug so it is better to stay on the tried and tested version, the bug was found in the publishing step --- Scripts/New-Win32App.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/New-Win32App.ps1 b/Scripts/New-Win32App.ps1 index 992fd00..e647e35 100644 --- a/Scripts/New-Win32App.ps1 +++ b/Scripts/New-Win32App.ps1 @@ -170,7 +170,7 @@ Process { # Create required .intunewin package from source folder Write-Output -InputObject "Creating .intunewin package file from source folder" - Invoke-WebRequest -URI "https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/raw/master/IntuneWinAppUtil.exe" -outfile "$env:TEMP\IntuneWinAppUtil.exe" + Invoke-WebRequest -URI "https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/raw/1a00a2a786de646c5fc46d6e1b79988c636e764e/IntuneWinAppUtil.exe" -outfile "$env:TEMP\IntuneWinAppUtil.exe" $IntuneAppPackage = New-IntuneWin32AppPackage -SourceFolder $SourceFolder -SetupFile $AppData.PackageInformation.SetupFile -OutputFolder $OutputFolder # Create default requirement rule