This is how I solved it:
First make a separate package of PhotoPlan in intune, package the setupphotoplan.exe with IntuneWinAppUtil
Install command:
setupPhotoPlan.exe /L1033 /S /v/qn
Detection file:
"%ProgramFiles(x86)%\PhotoPlan\PhotoPlan.exe"
Uninstall command:
msiexec.exe /X{8B9F017D-1926-414D-A739-034F244A8DFC} /passive /quiet
Then you make a new package for PV*Sol and make it depend on PhotoPlan being installed first:
Install command: (I did not try to add /MINIMAL, it seems it will just skip PhotoPlan since it is already installed)
setup_pvsolpremium_2023_1.exe /LANG=EN /SILENT
Detection file:
"%programfiles%\Valentin EnergieSoftware\PVSOL premium 2023\PVSOLpremium.exe"
Uninstall command:
"%ProgramFiles(x86)%\Valentin EnergieSoftware\PVSOL premium 2023\unins000.exe" /SILENT