Added support for AppList to be in JSON format. WinGet searches now use app ID. Modified InstallAppsandSysprep.cmd to handle packages with no dependencies

This commit is contained in:
Zehadi Alam
2024-07-04 22:57:14 -04:00
parent 2423814cc2
commit 8c897e93fe
4 changed files with 98 additions and 57 deletions
+14
View File
@@ -0,0 +1,14 @@
{
"apps": [
{
"name": "7-Zip",
"id": "7zip.7zip",
"source": "winget"
},
{
"name": "Company Portal",
"id": "9WZDNCRFJ3PZ",
"source": "msstore"
}
]
}
-2
View File
@@ -1,2 +0,0 @@
winget:7-Zip
store:Company Portal
@@ -33,20 +33,20 @@ for /d %%D in ("%basepath%\*") do (
set "licensefile=%%F"
)
if defined mainpackage (
set "dism_command=DISM /Online /Add-ProvisionedAppxPackage /PackagePath:"!mainpackage!""
if exist "!dependenciesfolder!" (
set "dism_command=DISM /Online /Add-ProvisionedAppxPackage /PackagePath:"!mainpackage!""
for %%G in ("!dependenciesfolder!\*") do (
set "dism_command=!dism_command! /DependencyPackagePath:"%%G""
)
if defined licensefile (
set "dism_command=!dism_command! /LicensePath:"!licensefile!""
) else (
set "dism_command=!dism_command! /SkipLicense"
)
set "dism_command=!dism_command! /Region:All"
echo !dism_command!
!dism_command!
)
if defined licensefile (
set "dism_command=!dism_command! /LicensePath:"!licensefile!""
) else (
set "dism_command=!dism_command! /SkipLicense"
)
set "dism_command=!dism_command! /Region:All"
echo !dism_command!
!dism_command!
)
)
:remaining