Question about MSIX features

%3CLINGO-SUB%20id%3D%22lingo-sub-2185480%22%20slang%3D%22en-US%22%3EQuestion%20about%20MSIX%20features%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2185480%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EWe're%20going%20to%20use%20MSIX%20to%20deploy%20a%20fairly%20complex%20solution%20that%20consists%20of%20an%20UWP%20application%2C%20Windows%20Service%20or%20UWP%20Background%20Task%2C%20and%20SQL%20Server%20Express%20instance.%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3ECould%20you%20please%20answer%20some%20of%20the%20following%20questions%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EWe%20should%20start%20background%20work%20right%20after%20installation%2C%20but%20UWP%20app%20must%20be%20launched%20at%20least%20once%20to%20register%20Background%20Task.%20Does%20MSIX%20provide%20any%20option%20to%20activate%20UWP%20app%20right%20after%20the%20installation%3F%3C%2FLI%3E%3CLI%3EIf%20it%20doesn't%2C%20we%20will%20have%20to%20use%20Windows%20Service%20and%20it%20is%20really%20great%20that%20MSIX%20team%20added%20support%20for%20Windows%20Services%20in%20the%20new%20versions%20of%20this%20tool.%20But%20does%20it%20support%20auto%20updates%20for%20Windows%20Services%2C%20or%20this%20feature%20works%20for%20UWP%20only%3F%3C%2FLI%3E%3CLI%3ESince%20we%20need%20to%20have%20that%20app%20working%20with%20local%20instance%20of%20SQL%20Express%2C%20we%20must%20add%20network%20loopback%20rule%20to%20grant%20UWP%20app%20access%20to%20SQL%20Server.%20Is%20it%20possible%20to%20execute%20%22%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3Echecknetisolation%20loopbackexempt%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%22%20command%20as%20part%20of%20app%20deployment%20process%3F%3C%2FLI%3E%3CLI%3ECan%20we%20use%20MSIX%20to%20deploy%20and%20update%20SQL%20Express%20databases%20too%3F%20I%20guess%20we%20should%20execute%20SqlPackage.exe%20for%20DACPAC%20deployment%20or%20sqlcmd.exe%20to%20run%20SQL%20scripts%2C%20but%20is%20it%20possible%20to%20run%20such%20commands%20during%20installation%20process%3F%3C%2FLI%3E%3CLI%3ECan%20one%20MSIX%20package%20contain%20multiple%20artifacts%3F%20It%20would%20be%20nice%20to%20have%20one%20MSIX%20package%20for%20UWP%20app%2C%20Windows%20Service%20and%20SQL%20database.%20%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EProbably%2C%20this%20is%20already%20too%20much%20for%20one%20package%2C%20but%20wouldn't%20it%20be%20possible%20to%20run%20silent%20installation%20of%20SQL%20Express%20from%20the%20same%20package%20too%3F%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2704549%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20about%20MSIX%20features%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2704549%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F930488%22%20target%3D%22_blank%22%3E%40omikhailov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%222%22%3EWe%20should%20start%20background%20work%20right%20after%20installation%2C%20but%20UWP%20app%20must%20be%20launched%20at%20least%20once%20to%20register%20Background%20Task.%20Does%20MSIX%20provide%20any%20option%20to%20activate%20UWP%20app%20right%20after%20the%20installation%3F%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%3ENot%20really.%20PreinstalledConfigTask%20and%20UpdateTask%20do%20just%20this%20but%20PreinstalledConfigTask%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Eis%20restricted%20to%20preinstalled%20packages.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%222%22%3EIf%20it%20doesn't%2C%20we%20will%20have%20to%20use%20Windows%20Service%20and%20it%20is%20really%20great%20that%20MSIX%20team%20added%20support%20for%20Windows%20Services%20in%20the%20new%20versions%20of%20this%20tool.%20But%20does%20it%20support%20auto%20updates%20for%20Windows%20Services%2C%20or%20this%20feature%20works%20for%20UWP%20only%3F%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ECan%20you%20please%20clarify%20what%20auto-update%20means%20here%3F%20It%20can%20be%20updated%20but%20the%20expectations%20are%20not%20clear.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%222%22%3ESince%20we%20need%20to%20have%20that%20app%20working%20with%20local%20instance%20of%20SQL%20Express%2C%20we%20must%20add%20network%20loopback%20rule%20to%20grant%20UWP%20app%20access%20to%20SQL%20Server.%20Is%20it%20possible%20to%20execute%20%22%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3Echecknetisolation%20loopbackexempt%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%22%20command%20as%20part%20of%20app%20deployment%20process%3F%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%3ENot%20Really.%20CustomActions%20are%20the%20only%20option%20for%20this%20but%20it%20is%20highly%20discouraged.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%222%22%3ECan%20we%20use%20MSIX%20to%20deploy%20and%20update%20SQL%20Express%20databases%20too%3F%20I%20guess%20we%20should%20execute%20SqlPackage.exe%20for%20DACPAC%20deployment%20or%20sqlcmd.exe%20to%20run%20SQL%20scripts%2C%20but%20is%20it%20possible%20to%20run%20such%20commands%20during%20installation%20process%3F%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%3EGenerally%20scripts%20running%20during%20deployment%20are%20not%20supported.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%222%22%3ECan%20one%20MSIX%20package%20contain%20multiple%20artifacts%3F%20It%20would%20be%20nice%20to%20have%20one%20MSIX%20package%20for%20UWP%20app%2C%20Windows%20Service%20and%20SQL%20database.%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EProbably%2C%20this%20is%20already%20too%20much%20for%20one%20package%2C%20but%20wouldn't%20it%20be%20possible%20to%20run%20silent%20installation%20of%20SQL%20Express%20from%20the%20same%20package%20too%3F%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22VIiyi%22%3E%3CSPAN%20class%3D%22JLqJ4b%20ChMk0b%22%3E%3CSPAN%3EPossibly.%20Though%20coupling%20a%20service%20to%20a%20UWP%20will%20cause%20an%20unnecessary%20friction%20in%20the%20servicing%20pipeline.%26nbsp%3Bi.e.%20UWP%20cannot%20update%20because%20the%20service%20fails%20to%20shutdown%20or%20vice%20versa.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Visitor

We're going to use MSIX to deploy a fairly complex solution that consists of an UWP application, Windows Service or UWP Background Task, and SQL Server Express instance. Could you please answer some of the following questions:

 

  • We should start background work right after installation, but UWP app must be launched at least once to register Background Task. Does MSIX provide any option to activate UWP app right after the installation?
  • If it doesn't, we will have to use Windows Service and it is really great that MSIX team added support for Windows Services in the new versions of this tool. But does it support auto updates for Windows Services, or this feature works for UWP only?
  • Since we need to have that app working with local instance of SQL Express, we must add network loopback rule to grant UWP app access to SQL Server. Is it possible to execute "checknetisolation loopbackexempt" command as part of app deployment process?
  • Can we use MSIX to deploy and update SQL Express databases too? I guess we should execute SqlPackage.exe for DACPAC deployment or sqlcmd.exe to run SQL scripts, but is it possible to run such commands during installation process?
  • Can one MSIX package contain multiple artifacts? It would be nice to have one MSIX package for UWP app, Windows Service and SQL database. Probably, this is already too much for one package, but wouldn't it be possible to run silent installation of SQL Express from the same package too?
1 Reply

@omikhailov 

 

  • We should start background work right after installation, but UWP app must be launched at least once to register Background Task. Does MSIX provide any option to activate UWP app right after the installation?

Not really. PreinstalledConfigTask and UpdateTask do just this but PreinstalledConfigTask is restricted to preinstalled packages.

  • If it doesn't, we will have to use Windows Service and it is really great that MSIX team added support for Windows Services in the new versions of this tool. But does it support auto updates for Windows Services, or this feature works for UWP only?

Can you please clarify what auto-update means here? It can be updated but the expectations are not clear.

  • Since we need to have that app working with local instance of SQL Express, we must add network loopback rule to grant UWP app access to SQL Server. Is it possible to execute "checknetisolation loopbackexempt" command as part of app deployment process?

Not Really. CustomActions are the only option for this but it is highly discouraged.

  • Can we use MSIX to deploy and update SQL Express databases too? I guess we should execute SqlPackage.exe for DACPAC deployment or sqlcmd.exe to run SQL scripts, but is it possible to run such commands during installation process?

Generally scripts running during deployment are not supported.

  • Can one MSIX package contain multiple artifacts? It would be nice to have one MSIX package for UWP app, Windows Service and SQL database. Probably, this is already too much for one package, but wouldn't it be possible to run silent installation of SQL Express from the same package too?

Possibly. Though coupling a service to a UWP will cause an unnecessary friction in the servicing pipeline. i.e. UWP cannot update because the service fails to shutdown or vice versa.