MSIX with Pre-requisites

%3CLINGO-SUB%20id%3D%22lingo-sub-356199%22%20slang%3D%22en-US%22%3EMSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356199%22%20slang%3D%22en-US%22%3E%3CDIV%3E%3CFONT%20color%3D%22%23000121%22%3EHello%20Team%2C%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%20color%3D%22%23000121%22%3E%3CSPAN%3E%40%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F73899%22%20target%3D%22_blank%22%3EJohn%20Vintzel%3C%2FA%3E%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CFONT%20color%3D%22%23000121%22%3EWe%20have%20MSI%20file%20which%20was%20created%20from%20Visual%20Studio%202017%20and%20i%20am%20trying%20to%20convert%20the%20MSI%20file%20into%20MSIX.%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CFONT%20color%3D%22%23000121%22%3EMy%20MSIX%20packaging%20tool%20installed%20properly%20and%20I%20just%20want%20to%20know%20how%20to%20add%20pre-requisites%20in%20MSIX%20so%20that%20MSIX%20will%20automatically%20install%20if%20not%20found.%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CFONT%20color%3D%22%23000121%22%3EOur%20application%20want%20below%20pre-requisites%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CFONT%20color%3D%22%23000121%22%3E1..Net%20Framework%204.6.1%3C%2FFONT%3E%3CU%3E%3CFONT%20color%3D%22%23000121%22%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FU%3E%3CFONT%20color%3D%22%23000121%22%3E2.Crystal%20Report%20Runtime%2032%26amp%3B%2064%20Bit%20(13.0.24)%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CFONT%20color%3D%22%23000121%22%3EOne%20more%20thing%20that%20how%20i%20can%20change%20the%20installation%20path%20currently%20it%20save%20on%20(C%3A%5CProgram%20Files%5CWindowsApp)%3C%2FFONT%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23000121%22%3EThanks%20%26amp%3B%20Regards%3CBR%20%2F%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23000121%22%3ESakthi%3C%2FFONT%3E%3CU%3E%3CFONT%20color%3D%22%23000121%22%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FU%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-356199%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Esakinfo83%40gmail.com%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-359426%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-359426%22%20slang%3D%22en-US%22%3E%3CP%3EI%20see%20John%20missed%20this%20one.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20the%20exception%20of%20Win7%20backrev%20deployment%2C%20.Net%204.6.1%20is%20guaranteed%20to%20be%20there.%26nbsp%3B%20MSIX%20does%20have%20a%20way%20to%20indicate%20package%20dependencies%2C%20but%20within%20the%20MSIX%20tool%20this%20means%20manually%20editing%20the%20AppXManifest.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMost%20of%20the%20time%2C%20I%20expect%20that%20an%20MSIX%20based%20app%20that%20needs%20Crystal%20Reports%20runtime%20available%20will%20need%20it%20available%20within%20the%20app%20MSIX%20container.%26nbsp%3B%20So%20an%20external%20%22native%22%20install%20or%20even%20a%20unrelated%20MSIX%20package%20listed%20as%20a%20package%20dependency%20won't%20meet%20your%20needs%20so%20going%20this%20dependency%20route%20will%20probably%20not%20go%20well%20for%20you.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20probably%20can%20package%20up%20Crystal%20Reports%20Runtime%20in%20an%20MSIX%20package%2C%20and%20then%20your%20app%20that%20depends%20on%20it%20as%20an%20Add-On%20package%20(Modification%20package%20in%20MSIX%20Packaging%20Tool%20parlance)%2C%20except%20that%20(currently)%20modification%20packages%20don't%20get%20shortcuts%20and%20you%20need%20one%20(or%20more)%20of%20those.%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20if%20you%20have%20to%20put%20the%20shortcut%20into%20CRR%2C%20given%20these%20limitations%20today%20I'd%20just%20make%20a%20single%20package%20with%20both%20parts.%26nbsp%3B%20It's%20not%20as%20bad%20of%20idea%20as%20it%20sounds%2C%20as%20you%20probably%20aren't%20going%20to%20change%20CRR%20on%20it's%20own%20and%20you%20have%20single%20instance%20download%20and%20storage%20at%20the%20block%20level.%26nbsp%3B%20So%20no%20matter%20how%20many%20packages%20you%20build%20with%20the%20CRR%20in%20it%2C%20you%20still%20only%20download%20and%20store%20it%20once%20on%20the%20client.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-902042%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-902042%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F149589%22%20target%3D%22_blank%22%3E%40Tim%20Mangan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20similar%20problem.%20I%20would%20like%20to%20ship%20an%20app%20as%20an%20.msix.%20This%20app%20needs%20to%20have%20Sql%20Server%20Localdb%20installed.%20Our%20current%20installer%20(made%20by%20installshield)%20checks%20if%20Localdb%20is%20installed%2C%20and%20if%20not%20installs%20it%20(after%20having%20asked%20the%20user%20for%20permission).%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%20achieve%20something%20like%20that%20with%20msix%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-902361%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-902361%22%20slang%3D%22en-US%22%3EChanges%20made%20by%20Microsoft%20to%20the%20PSF%20may%20be%20the%20best%20way%20to%20go.%20In%20your%20package%20include%20the%20PsfLauncher%20EXE%20and%20PsfRuntime%20DLL%20and%20config.json%20file.%20Make%20PsfLauncher%20the%20target%20of%20the%20shortcut.%20Configure%20the%20json%20file%20to%20have%20PsfLauncher%20run%20a%20script%20before%20starting%20the%20real%20app.%20The%20script%20must%20be%20in%20PowerShell%2C%20perform%20the%20check%20and%20install%20if%20necessary.%20There%20may%20be%20a%20UAC%20prompt.%20Not%20sure%20what%20to%20do%20with%20that%20one%2C%20though.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-902549%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-902549%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F149589%22%20target%3D%22_blank%22%3E%40Tim%20Mangan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply%20Tim.%20I've%20tried%20to%20add%20the%20psf%20files%20plus%20a%20config.json%20to%20my%20to%20my%20%22Windows%20Application%20Packaging%20Project%22%2C%20but%20I'm%20not%20really%20sure%20how%20to%20continue%20from%20here.%20Is%20there%20any%20example%20of%20this%20that%20you%20can%20direct%20me%20to%3F%3C%2FP%3E%3CP%3EAlso%20a%20beginner%20when%20it%20comes%20to%20Powershell%20scripting.%20Do%20you%20know%20of%20any%20good%20resource%20for%20checking%20and%20installing%20an%20app%20from%20powershell.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1041210%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1041210%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F422875%22%20target%3D%22_blank%22%3E%40FredrikDahlberg%3C%2FA%3E%20I%20built%20some%20tooling%20to%20help%20with%20the%20Psf%2C%20but%20it%20only%20works%20for%20repackaging%20scenarios%2C%20not%20in%20package%20build%20projects.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20lots%20of%20good%20online%20resources%20for%20PowerShell%2C%20and%20by%20now%20you've%20probably%20found%20a%20few.%20But%20if%20not%2C%20all%20you'd%20really%20need%20is%20enough%20PowerShell%20knowledge%20to%20have%20a%20ps1%20file%20that%20runs%20a%20cmd.exe%20process%20with%20arguments%20%22%2Fc%26nbsp%3B%20filename.cmd%22%20and%20you%20can%20then%20have%20a%20cmd%20script%20instead.%20(Similarly%20if%20you%20prefer%20cscript%20you%20can%20start%20a%20cscript.exe%20command%20line).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESomeday%20maybe%20I'll%20extend%20the%20Psf%20scripting%20to%20support%20directly%20specifying%20a%20cmd%2C%20cscript%2C%20or%20wscript%20file%20in%20addition%20to%20the%20ps1%20filetype%2C%20but%20it%20isn't%20very%20high%20on%20my%20priority%20list.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1043169%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1043169%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F149589%22%20target%3D%22_blank%22%3E%40Tim%20Mangan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWould%20another%20option%20be%20to%20install%20the%20server%20during%20convert%20time%20of%20the%20MSI%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI've%20ran%20into%20this%20issue%20when%20apps%20use%20Java.%26nbsp%3B%20When%20running%20the%20MSIX%20packaging%20tool%20I%20first%20install%20Java%20then%20I%20run%20the%20msi.%26nbsp%3B%20That%20way%20Java%20is%20installed%20in%20the%20package.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1043173%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1043173%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F475788%22%20target%3D%22_blank%22%3E%40Darren_Hoehna%3C%2FA%3E%26nbsp%3B%20I%20am%20guessing%20that%20the%20Sql%20Server%20LocalDB%20is%20a%20service%20which%20is%20why%20I%20was%20thinking%20about%20scripts.%26nbsp%3B%20But%20now%20support%20for%20services%20was%20announced%20at%20Ignite%2C%20and%20can%20be%20tested%20now%20using%20Insider%20builds%20of%20the%20packaging%20tool%20and%20insider%20build%20of%20the%202020H1%20OS.%20You%20wouldn't%20need%20the%20packaging%20tool%2C%20except%20maybe%20to%20do%20a%20test%20capture%20to%20learn%20the%20manifest%20syntax%20that%20would%20have%20to%20be%20manually%20added%20to%20the%20manifest%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20option%20wasn't%20available%20when%20this%20thread%20started%2C%20but%20could%20be%20tried%20now.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1043174%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1043174%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F149589%22%20target%3D%22_blank%22%3E%40Tim%20Mangan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAhh.%26nbsp%3B%20Yes.%26nbsp%3B%20if%20localDB%20is%20a%20service%20then%20my%20first%20option%20may%20not%20work.%26nbsp%3B%20So%2C%20maybe%20the%20localDB%20installer%20can%20be%20packaged%20with%20the%20app%20and%20a%20script%20can%20be%20useeat%20startup%20to%20install%20the%20service.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBasically%20what%20you%20said.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1043177%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1043177%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F422875%22%20target%3D%22_blank%22%3E%40FredrikDahlberg%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20to%20use%20PSF%20scripts%20to%20install%20SQL%20server%20from%20the%20App%20Packaging%20project%20you%20need%20to%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAdd%20PsfLauncher*.exe%2C%20PsfRunDLL*.exe%2C%20PsfRuntime*.dll%2C%20and%20StartingScriptWrapper.ps1%20to%20your%20package%3C%2FLI%3E%0A%3CLI%3EMake%20a%20config.json%20file.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EMake%20your%20own%20.ps1%20file%20that%20will%20install%20SQL%26nbsp%3B%3CBR%20%2F%3EI%20found%20a%20few%20inks%20that%20may%20be%20helpful%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.niallbrady.com%2F2018%2F04%2F25%2Finstall-sql-server-2017-powershell-script-download-it-here%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.niallbrady.com%2F2018%2F04%2F25%2Finstall-sql-server-2017-powershell-script-download-it-here%2F%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcolinsalmcorner.com%2Fpost%2Finstall-and-configure-sql-server-using-powershell-dsc%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcolinsalmcorner.com%2Fpost%2Finstall-and-configure-sql-server-using-powershell-dsc%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EAdd%20the%20script%20to%20the%20config.json%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20everything%20is%20right%20the%20script%20will%20start%20when%20the%20app%20starts%20and%20install%20SQL.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20add%20an%20ending%20script%20that%20will%20shut%20down%20SQL%20when%20the%20app%20exits.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20this%20helps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETanaka%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1158754%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20with%20Pre-requisites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1158754%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F475788%22%20target%3D%22_blank%22%3E%40Darren_Hoehna%3C%2FA%3E%26nbsp%3BSQL%20Server%20LocalDB%20is%20not%20a%20service%2C%20the%20exe%20is%20called%20up%20on%20demand%20by%20the%20main%20application.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wish%20you%20the%20best%20of%20luck%20getting%20it%20to%20work%20though%2C%20in%20App-V%20the%20exe%20crashes%20and%20restarts%20repeatedly!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor
Hello Team,
 
We have MSI file which was created from Visual Studio 2017 and i am trying to convert the MSI file into MSIX.
 
My MSIX packaging tool installed properly and I just want to know how to add pre-requisites in MSIX so that MSIX will automatically install if not found.
 
Our application want below pre-requisites
 
1..Net Framework 4.6.1
2.Crystal Report Runtime 32& 64 Bit (13.0.24)
 
One more thing that how i can change the installation path currently it save on (C:\Program Files\WindowsApp)

 

 

 

Thanks & Regards
Sakthi

10 Replies

I see John missed this one.

 

With the exception of Win7 backrev deployment, .Net 4.6.1 is guaranteed to be there.  MSIX does have a way to indicate package dependencies, but within the MSIX tool this means manually editing the AppXManifest.

 

Most of the time, I expect that an MSIX based app that needs Crystal Reports runtime available will need it available within the app MSIX container.  So an external "native" install or even a unrelated MSIX package listed as a package dependency won't meet your needs so going this dependency route will probably not go well for you. 

 

You probably can package up Crystal Reports Runtime in an MSIX package, and then your app that depends on it as an Add-On package (Modification package in MSIX Packaging Tool parlance), except that (currently) modification packages don't get shortcuts and you need one (or more) of those.   

 

So if you have to put the shortcut into CRR, given these limitations today I'd just make a single package with both parts.  It's not as bad of idea as it sounds, as you probably aren't going to change CRR on it's own and you have single instance download and storage at the block level.  So no matter how many packages you build with the CRR in it, you still only download and store it once on the client.

 

 

 

 

 

@Tim Mangan 

Hi,

 

I have a similar problem. I would like to ship an app as an .msix. This app needs to have Sql Server Localdb installed. Our current installer (made by installshield) checks if Localdb is installed, and if not installs it (after having asked the user for permission). 

Is it possible to achieve something like that with msix?

Changes made by Microsoft to the PSF may be the best way to go. In your package include the PsfLauncher EXE and PsfRuntime DLL and config.json file. Make PsfLauncher the target of the shortcut. Configure the json file to have PsfLauncher run a script before starting the real app. The script must be in PowerShell, perform the check and install if necessary. There may be a UAC prompt. Not sure what to do with that one, though.

@Tim Mangan 

Thanks for your reply Tim. I've tried to add the psf files plus a config.json to my to my "Windows Application Packaging Project", but I'm not really sure how to continue from here. Is there any example of this that you can direct me to?

Also a beginner when it comes to Powershell scripting. Do you know of any good resource for checking and installing an app from powershell. 

@FredrikDahlberg I built some tooling to help with the Psf, but it only works for repackaging scenarios, not in package build projects. 

 

There are lots of good online resources for PowerShell, and by now you've probably found a few. But if not, all you'd really need is enough PowerShell knowledge to have a ps1 file that runs a cmd.exe process with arguments "/c  filename.cmd" and you can then have a cmd script instead. (Similarly if you prefer cscript you can start a cscript.exe command line).

 

Someday maybe I'll extend the Psf scripting to support directly specifying a cmd, cscript, or wscript file in addition to the ps1 filetype, but it isn't very high on my priority list.

 

@Tim Mangan 

 

Would another option be to install the server during convert time of the MSI?

 

I've ran into this issue when apps use Java.  When running the MSIX packaging tool I first install Java then I run the msi.  That way Java is installed in the package.

@Darren_Hoehna  I am guessing that the Sql Server LocalDB is a service which is why I was thinking about scripts.  But now support for services was announced at Ignite, and can be tested now using Insider builds of the packaging tool and insider build of the 2020H1 OS. You wouldn't need the packaging tool, except maybe to do a test capture to learn the manifest syntax that would have to be manually added to the manifest file.

 

This option wasn't available when this thread started, but could be tried now.

@Tim Mangan 

 

Ahh.  Yes.  if localDB is a service then my first option may not work.  So, maybe the localDB installer can be packaged with the app and a script can be useeat startup to install the service.

 

Basically what you said.

@FredrikDahlberg 

 

If you to use PSF scripts to install SQL server from the App Packaging project you need to:

  1. Add PsfLauncher*.exe, PsfRunDLL*.exe, PsfRuntime*.dll, and StartingScriptWrapper.ps1 to your package
  2. Make a config.json file. 
  3. Make your own .ps1 file that will install SQL 
    I found a few inks that may be helpful:
    https://www.niallbrady.com/2018/04/25/install-sql-server-2017-powershell-script-download-it-here/
    https://colinsalmcorner.com/post/install-and-configure-sql-server-using-powershell-dsc
  4. Add the script to the config.json

 

If everything is right the script will start when the app starts and install SQL.

 

You can also add an ending script that will shut down SQL when the app exits.

 

Hope this helps.

 

Tanaka

@Darren_Hoehna SQL Server LocalDB is not a service, the exe is called up on demand by the main application.

 

I wish you the best of luck getting it to work though, in App-V the exe crashes and restarts repeatedly!