I have currently created an offline media ISO to deploy a windows image and then install applications on to it e.g. Notepad++. When I run the task to install each individual application I get the error code 2.
My settings for the application are:

The BDDLog shows:
<![LOG[Language/Locale Identified (in order of precedence): 2057,0809,0x0809,9,0009,0x0009]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[Mandatory Single Application install indicated. Guid: {9145c5fb-b669-44ad-b727-3cc2cc8533de}]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[################]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[Entry: {9145c5fb-b669-44ad-b727-3cc2cc8533de}]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[Name: NotepadPlusPlus 8.5.4]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[################]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[Using a local or mapped drive, no connection is required.]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[ Change directory: D:\Deploy\Applications\NotepadPlusPlus_8.5.4]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[ Run Command: D:\Deploy\Tools\X64\bddrun.exe start-process -FilePath ".\npp.8.5.4.Installer.x64.exe" -ArgumentList '/S' -Verb runas -Wait]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[ZTI installing application ]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[About to run command: D:\Deploy\Tools\X64\bddrun.exe start-process -FilePath ".\npp.8.5.4.Installer.x64.exe" -ArgumentList '/S' -Verb runas -Wait]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[Command has been started (process ID 1920)]LOG]!><time="08:42:13.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[Return code from command = 2]LOG]!><time="08:42:14.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[Application NotepadPlusPlus 8.5.4 returned an unexpected return code: 2]LOG]!><time="08:42:14.000+000" date="07-20-2023" component="ZTIApplications" context="" type="3" thread="" file="ZTIApplications">
<![LOG[Property InstalledApplications001 is now = {9145c5fb-b669-44ad-b727-3cc2cc8533de}]LOG]!><time="08:42:14.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
<![LOG[ZTIApplications processing completed successfully.]LOG]!><time="08:42:14.000+000" date="07-20-2023" component="ZTIApplications" context="" type="1" thread="" file="ZTIApplications">
When I run the commands below in powershell on the computer I do not get any output:
cd D:\Deploy\Applications\NotepadPlusPlus_8.5.4
D:\Deploy\Tools\X64\bddrun.exe start-process -FilePath ".\npp.8.5.4.Installer.x64.exe" -ArgumentList '/S' -Verb runas -Wait
If I run the commands below then notepad++ will install correctly as expected:
cd D:\Deploy\Applications\NotepadPlusPlus_8.5.4
start-process -FilePath ".\npp.8.5.4.Installer.x64.exe" -ArgumentList '/S' -Verb runas -Wait
Running the command below did not resolve the issue either:
D:\Deploy\Tools\X64\bddrun.exe start-process -FilePath "D:\Deploy\Applications\NotepadPlusPlus_8.5.4\npp.8.5.4.Installer.x64.exe" -ArgumentList '/S' -Verb runas -Wait
there are multiple applications with this same issue