%3CLINGO-SUB%20id%3D%22lingo-sub-316885%22%20slang%3D%22en-US%22%3EChaining%20multiple%20installers%20with%20the%20Desktop%20App%20Converter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-316885%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Sep%2011%2C%202017%20%3C%2FSTRONG%3E%3CBR%20%2F%3EOne%20of%20the%20key%20requirements%20of%20an%20app%20package%20deployed%20from%20the%20Store%20is%20that%20it%20must%20be%20self-contained%3A%20the%20application%20must%20run%20without%20asking%20to%20the%20user%20to%20manually%20install%20a%20set%20of%20libraries%2C%20a%20framework%20or%20a%20runtime.%20If%20this%20requirement%20is%20easy%20to%20satisfy%20with%20a%20regular%20UWP%20application%2C%20since%20they%20fully%20rely%20on%20the%20Universal%20Windows%20Platform%20that%20ships%20with%20Windows%2010%2C%20it%20isn%E2%80%99t%20necessarily%20the%20case%20when%20it%20comes%20to%20desktop%20applications%20packaged%20with%20the%20Desktop%20Bridge.%20These%20applications%2C%20in%20fact%2C%20can%20be%20developed%20using%20also%20non-Microsoft%20technologies%2C%20like%20Java%20or%20Electron%2C%20or%20rely%20on%20a%20specific%20version%20of%20a%20library%20(like%20a%20specific%20version%20of%20DirectX%20or%20of%20the%20Visual%20Studio%20C%2B%2B%20runtime)%2C%20which%20aren%E2%80%99t%20built-in%20in%20the%20operating%20system.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20To%20solve%20this%20problem%2C%20usually%20traditional%20desktop%20installers%20include%20in%20the%20setup%20process%20of%20the%20application%20also%20the%20installer%20of%20the%20dependency%20or%20they%20trigger%20a%20remote%20download%20and%20a%20separate%20installation%20process.%20However%2C%20a%20Desktop%20Bridge%20application%20can%E2%80%99t%20use%20this%20approach%3A%20all%20the%20dependencies%20and%20required%20files%20should%20be%20included%20in%20the%20package%20and%20installed%20when%20the%20user%20downloads%20the%20app%20from%20the%20Store.%20The%20application%20can%E2%80%99t%20trigger%2C%20when%20it%20starts%2C%20the%20execution%20of%20a%20separate%20installer.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20However%2C%20in%20many%20cases%2C%20these%20frameworks%20or%20libraries%20can%E2%80%99t%20simply%20be%20included%20as%20standalone%20inside%20the%20package%2C%20because%20the%20application%20looks%20for%20them%20in%20system%20folders%20like%20Windows%2C%20System32%2C%20Program%20Files%2C%20etc.%20To%20solve%20this%20scenario%2C%20the%20Desktop%20Bridge%20supports%20the%20concept%20of%20Virtual%20File%20System.%20Inside%20a%20package%20you%20can%20create%20a%20folder%20called%20%3CSTRONG%3EVFS%20%3C%2FSTRONG%3E%2C%20which%20contains%20multiple%20folders%20that%20maps%20the%20various%20system%20folders%2C%20by%20following%20the%20naming%20schema%20described%20in%20the%20documentation%20at%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fporting%2Fdesktop-to-uwp-behind-the-scenes%23file-system%22%20title%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fporting%2Fdesktop-to-uwp-behind-the-scenes%23file-system%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fporting%2Fdesktop-to-uwp-behind-the-scenes%23file-system%3C%2FA%3E%20%3CBR%20%2F%3E%3CTABLE%3E%0A%20%20%20%3CTBODY%3E%3CTR%3E%0A%20%20%20%20%3CTD%3E%3CSTRONG%3E%20System%20location%20%3C%2FSTRONG%3E%3C%2FTD%3E%0A%20%20%20%20%3CTD%3E%3CSTRONG%3E%20Redirected%20location%20under%20%5BPackage%2FVFS%5D%20%3C%2FSTRONG%3E%3C%2FTD%3E%0A%20%20%20%20%3CTD%3E%3CSTRONG%3E%20Valid%20on%20architectures%20%3C%2FSTRONG%3E%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_SystemX86%3C%2FTD%3E%0A%20%20%20%20%3CTD%3ESystemX86%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_System%3C%2FTD%3E%0A%20%20%20%20%3CTD%3ESystemX64%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Eamd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_ProgramFilesX86%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EProgramFilesX86%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd6%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_ProgramFilesX64%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EProgramFilesX64%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Eamd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_ProgramFilesCommonX86%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EProgramFilesCommonX86%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_ProgramFilesCommonX64%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EProgramFilesCommonX64%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Eamd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_Windows%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EWindows%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_ProgramData%3C%2FTD%3E%0A%20%20%20%20%3CTD%3ECommon%20AppData%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_System%5Ccatroot%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EAppVSystem32Catroot%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_System%5Ccatroot2%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EAppVSystem32Catroot2%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_System%5Cdrivers%5Cetc%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EAppVSystem32DriversEtc%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_System%5Cdriverstore%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EAppVSystem32Driverstore%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_System%5Clogfiles%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EAppVSystem32Logfiles%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%20%3CTR%3E%0A%20%20%20%20%3CTD%3EFOLDERID_System%5Cspool%3C%2FTD%3E%0A%20%20%20%20%3CTD%3EAppVSystem32Spool%3C%2FTD%3E%0A%20%20%20%20%3CTD%3Ex86%2C%20amd64%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%3C%2FTBODY%3E%3C%2FTABLE%3E%3CBR%20%2F%3E%20Whenever%20the%20user%20will%20launch%20your%20application%2C%20Windows%20will%20look%20for%20the%20dependencies%20in%20the%20VFS%20folder%20first.%20This%20approach%20helps%20also%20to%20solve%20the%20problem%20known%20as%20%E2%80%9CDLL%20Hell%E2%80%9D%2C%20which%20is%20very%20frequent%20in%20the%20desktop%20world.%20The%20term%20refers%20to%20the%20fact%20that%20you%20may%20have%20installed%20on%20your%20computer%20multiple%20applications%20that%20depends%20by%20the%20same%20framework%20or%20set%20of%20libraries.%20Since%20they%20are%20installed%20system-wide%2C%20all%20the%20applications%20will%20use%20the%20same%20one.%20However%2C%20this%20can%20cause%20issues%20if%20you%20have%2C%20for%20example%2C%20Application%20A%20which%20requires%20Framework%20X%201.0%2C%20while%20Application%20B%20requires%20Framework%20X%202.0.%20The%20more%20recent%20version%20can%20contain%2C%20in%20fact%2C%20breaking%20changes%20that%20could%20lead%20to%20Application%20A%20to%20stop%20working%20properly%20or%20to%20have%20issues%20we%20aren%E2%80%99t%20aware%20of%2C%20because%20we%20have%20never%20tested%20our%20application%20against%20it.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Thanks%20to%20the%20Virtual%20File%20System%2C%20each%20application%20will%20leverage%20its%20own%20specific%20version%20of%20the%20framework%20or%20the%20libraries.%20This%20way%2C%20if%20we%20install%20an%20application%20that%20requires%20a%20more%20recent%20version%2C%20it%20won%E2%80%99t%20break%20the%20already%20installed%20ones%2C%20since%20they%20will%20continue%20to%20leverage%20the%20libraries%20embedded%20in%20the%20package%20and%20not%20the%20system-wide%20version.%20%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId-1593094141%22%20id%3D%22toc-hId-1599709638%22%20id%3D%22toc-hId-1599709638%22%20id%3D%22toc-hId-1599709638%22%20id%3D%22toc-hId-1599709638%22%20id%3D%22toc-hId-1599709638%22%3E%3C%2FH3%3E%3CBR%20%2F%3E%20The%20easiest%20way%20to%20create%20the%20proper%20VFS%20structure%20required%20by%20the%20application%20is%20to%20use%20the%20%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fappconsult%2F2016%2F10%2F17%2Fdesktop-bridge-converting-an-installer%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDesktop%20App%20Converter%20%3C%2FA%3E.%20As%20you%E2%80%99ll%20probably%20know%2C%20this%20tool%20runs%20the%20traditional%20desktop%20installer%20of%20your%20application%20inside%20a%20container%2C%20it%20detects%20all%20the%20changes%20performed%20by%20the%20setup%20process%20(file%20system%2C%20registry%20keys%2C%20etc.)%20and%20exports%20the%20result%20into%20a%20Universal%20Windows%20Package.%20One%20of%20the%20changes%20detected%20by%20the%20tool%20are%20exactly%20dependencies%3A%20in%20these%20cases%2C%20the%20correct%20VFS%20infrastructure%20is%20automatically%20recreated%20inside%20the%20package%2C%20allowing%20the%20application%20to%20leverage%20it%20in%20the%20right%20way%20so%20that%20it%20doesn%E2%80%99t%20require%20a%20system-wide%20version%20installed%20on%20the%20user%E2%80%99s%20computer.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20However%2C%20not%20all%20the%20desktop%20installers%20support%20this%20feature%3A%20there%20are%20many%20scenarios%20where%20the%20user%20is%20asked%20to%20manually%20install%20a%20dependency%20before%20starting%20the%20application.%20For%20these%20scenario%2C%20there%E2%80%99s%20an%20easy%20solution%3A%20chain%20multiple%20installers%20using%20a%20single%20batch%20file%20and%20then%20use%20it%20as%20a%20starting%20point%20of%20the%20Desktop%20App%20Converter.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Let%E2%80%99s%20see%20a%20real%20example!%20%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId--959062820%22%20id%3D%22toc-hId--952447323%22%20id%3D%22toc-hId--952447323%22%20id%3D%22toc-hId--952447323%22%20id%3D%22toc-hId--952447323%22%20id%3D%22toc-hId--952447323%22%3E%3C%2FH3%3E%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId-783747515%22%20id%3D%22toc-hId-790363012%22%20id%3D%22toc-hId-790363012%22%20id%3D%22toc-hId-790363012%22%20id%3D%22toc-hId-790363012%22%20id%3D%22toc-hId-790363012%22%3ECreating%20the%20batch%20file%3C%2FH3%3E%3CBR%20%2F%3E%20As%20a%20sample%20for%20this%20scenario%2C%20I%E2%80%99m%20going%20to%20simulate%20that%20my%20application%20has%20a%20dependency%20from%20the%20Visual%20C%2B%2B%20runtime%2C%20specifically%20from%20version%2010.0.%20Why%20using%20such%20an%20old%20version%3F%20If%20you%20are%20a%20regular%20reader%20of%20this%20blog%2C%20you%E2%80%99ll%20probably%20know%20that%20Visual%20C%2B%2B%20libraries%20are%20distributed%20by%20Microsoft%20also%20as%20Store%20packages.%20As%20such%2C%20%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fappconsult%2F2016%2F10%2F20%2Fdesktop-bridge-how-to-handle-c-and-c-dependencies-with-the-desktop-app-converter%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eas%20we%20have%20learned%20in%20another%20post%20%3C%2FA%3E%2C%20if%20your%20application%20has%20a%20dependency%20from%20them%2C%20you%20can%20simply%20declare%20it%20in%20the%20manifest%20file%2C%20like%20in%20the%20following%20sample%3A%20%3CBR%20%2F%3E%3CDEPENDENCIES%3E%20%3CBR%20%2F%3E%3CTARGETDEVICEFAMILY%20name%3D%22%26quot%3BWindows.Desktop%26quot%3B%22%20minversion%3D%22%26quot%3B10.0.14393.0%26quot%3B%22%20maxversiontested%3D%22%26quot%3B10.0.15063.0%26quot%3B%22%3E%3C%2FTARGETDEVICEFAMILY%3E%20%3CBR%20%2F%3E%3CPACKAGEDEPENDENCY%20name%3D%22%26quot%3BMicrosoft.VCLibs.110.00.UWPDesktop%26quot%3B%22%20minversion%3D%22%26quot%3B11.0.24217.0%26quot%3B%22%20publisher%3D%22%26quot%3BCN%3DMicrosoft%22%20corporation%3D%22%22%3E%3C%2FPACKAGEDEPENDENCY%3E%20%3CBR%20%2F%3E%3CPACKAGEDEPENDENCY%20name%3D%22%26quot%3BMicrosoft.VCLibs.140.00.UWPDesktop%26quot%3B%22%20minversion%3D%22%26quot%3B14.0.24217.0%26quot%3B%22%20publisher%3D%22%26quot%3BCN%3DMicrosoft%22%20corporation%3D%22%22%3E%3C%2FPACKAGEDEPENDENCY%3E%20%3CBR%20%2F%3E%3C%2FDEPENDENCIES%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20way%2C%20when%20the%20user%20installs%20the%20application%20from%20the%20Store%2C%20if%20he%20doesn%E2%80%99t%20have%20the%20Visual%20C%2B%2B%20libraries%20on%20his%20machine%2C%20Windows%20will%20take%20care%20of%20automatically%20downloading%20them%20too.%20However%2C%20the%20Store%20offers%20three%20versions%20of%20the%20library%3A%2011.0%2C%2012.0%20and%2014.0.%20As%20you%20can%20see%2C%2010.0%20isn%E2%80%99t%20supported%20and%2C%20as%20such%2C%20we%20need%20to%20use%20another%20approach%20to%20include%20it.%20This%20approach%20is%20exactly%20using%20the%20VFS%20folder.%20However%2C%20in%20a%20real%20scenario%20I%20faced%20working%20with%20a%20customer%2C%20we%20didn%E2%80%99t%20have%20an%20installer%20as%20a%20starting%20point%2C%20so%20the%20first%20tentative%20we%20did%20was%20to%20manually%20recreate%20the%20VFS%20folder%20and%20copy%20the%20dependencies%20from%20my%20Windows%20installation.%20However%2C%20it%20wasn%E2%80%99t%20an%20easy%20task%3A%20we%20haven%E2%80%99t%20been%20able%20to%20find%20a%20comprehensive%20list%20of%20all%20the%20DLLs%20copied%20by%20the%20Visual%20C%2B%2B%20runtime%20installer%20and%20the%20exact%20location%20where%20they%20are%20placed.%20As%20such%2C%20we%20were%20stuck%20in%20getting%20an%20error%20every%20the%20application%20was%20launched.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Thanks%20to%20a%20suggestion%20from%20Adam%20Braden%20from%20the%20Dev%20Platform%20team%2C%20we%E2%80%99ve%20been%20able%20to%20find%20a%20workaround%20that%20allowed%20us%20to%20move%20on%20and%20get%20the%20packaged%20application%20up%20%26amp%3B%20running%3A%20chain%20installers.%20The%20Desktop%20App%20Converter%2C%20in%20fact%2C%20doesn%E2%80%99t%20support%20just%20regular%20installers%20like%20a%20MSI%20file%2C%20but%20you%20can%20pass%20as%20%E2%80%93%20%3CSTRONG%3EInstaller%20%3C%2FSTRONG%3Eparameter%20also%20a%20batch%20file.%20The%20tool%20will%20simply%20execute%20all%20the%20commands%20inside%20the%20file%20and%20then%20will%20export%20the%20changes.%20As%20such%2C%20I%E2%80%99ve%20first%20downloaded%20a%20simple%20free%20application%20(%20%3CA%20href%3D%22http%3A%2F%2Fwww.7-zip.org%2Fdownload.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E7-zip%20%3C%2FA%3E)%2C%20in%20order%20to%20have%20a%20real%20setup%20process%20that%20could%20be%20executed%20inside%20the%20container%2C%20and%20then%20I%E2%80%99ve%20created%20a%20batch%20file%20that%20takes%20care%20of%20installing%20first%20the%20application%20and%20then%20VC%2B%2B%20runtime.%20Here%20is%20how%20the%20batch%20files%20look%20like%3A%20%3CBR%20%2F%3Emsiexec%20%2Fi%20%227z1701-x64.msi%22%20%2Fquiet%20%2Fqn%20%2Fnorestart%20%3CBR%20%2F%3Evcredist_x86.exe%20%2Fq%20%2Fnorestart%20%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20you%20can%20see%2C%20it%E2%80%99s%20simply%20a%20plain%20text%20file%20(which%20you%E2%80%99ll%20need%20to%20save%20with%20the%20%3CSTRONG%3E.bat%20%3C%2FSTRONG%3Eextension)%20that%20invokes%20the%20two%20installations%2C%20one%20after%20the%20other.%20The%20only%20difference%20compared%20to%20when%20we%20use%20the%20Desktop%20App%20Converter%20directly%20on%20a%20MSI%20installer%20is%20that%2C%20in%20this%20case%2C%20we%20have%20to%20manually%20specify%20the%20parameters%20which%20are%20required%20to%20perform%20a%20silent%20installation%20(%20%3CSTRONG%3E%2Fquiet%20%2Fqn%20%2Fnorestart%20%3C%2FSTRONG%3E).%20Since%20the%20DAC%20will%20receive%2C%20as%20input%2C%20a%20batch%20file%20and%20not%20a%20MSI%20one%2C%20it%20won%E2%80%99t%20be%20able%20to%20apply%20automatically%20these%20parameters.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Now%20that%20you%20have%20created%20the%20batch%20file%2C%20you%20simply%20need%20to%20run%20the%20Desktop%20App%20Converter%20as%20usual.%20The%20only%20difference%20is%20that%20the%20%E2%80%93%20%3CSTRONG%3EInstaller%20%3C%2FSTRONG%3Eparameter%20will%20point%20to%20the%20batch%20file%20and%20not%20to%20a%20traditional%20setup%2C%20like%20in%20the%20following%20sample%3A%20%3CBR%20%2F%3EDesktopAppConverter%20-Installer%20%22C%3A%5CUsers%5Cmpagani%5CDesktop%5CVCRedist%5Csetup.bat%22%20-Destination%20%22C%3A%5CVCRedist-AppX%22%20-PackageName%20%22VCRedist%22%20-Publisher%20%22CN%3Dmpagani%22%20-Version%20%221.0.0.0%22%20-Verbose%20%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20DAC%20will%20run%20as%20usual%3A%20the%20only%20difference%20will%20happen%20under%20the%20hood.%20After%20spinning%20up%20the%20container%2C%20in%20fact%2C%20the%20tool%20will%20execute%20the%20batch%20file%20inside%20it%2C%20which%20will%20trigger%20the%20two%20installations%2C%20one%20after%20the%20other.%20Only%20when%20both%20of%20them%20are%20completed%2C%20the%20container%20will%20be%20stopped%20and%20the%20tool%20will%20export%20all%20the%20changes%20that%20have%20been%20applied%2C%20which%20will%20be%20a%20merge%20of%20the%207-Zip%20and%20the%20VC%2B%2B%20runtime%20installations.%20If%20you%20open%20the%20%3CSTRONG%3EVFS%20%3C%2FSTRONG%3Efolder%20stored%20inside%20the%20%3CSTRONG%3EPackageFiles%20%3C%2FSTRONG%3Efolder%2C%20which%20is%20created%20in%20the%20path%20that%20you%20have%20set%20in%20the%20%E2%80%93%20%3CSTRONG%3EDestination%20%3C%2FSTRONG%3Eparameter%2C%20you%20will%20see%20that%20our%20batch%20worked%3A%20the%20root%20of%20the%20package%20will%20contain%20the%207-zip%20application%E2%80%99s%20files%2C%20but%20also%20a%20VFS%20entry%20with%20two%20subfolders%20that%20map%20the%20system%20folders%20where%20the%20VC%2B%2B%20runtime%20has%20been%20installed%20(in%20this%20case%2C%20%3CSTRONG%3EProgramFilesCommonX86%20%3C%2FSTRONG%3Ewhich%20maps%20the%20system%20folder%20%3CSTRONG%3EC%3A%5CProgram%20Files%20(x86)%20%3C%2FSTRONG%3Eand%20%3CSTRONG%3ESystemX86%20%3C%2FSTRONG%3E%2C%20which%20maps%20the%20system%20folder%20%3CSTRONG%3EC%3A%5CWindows%5CSystem32%20%3C%2FSTRONG%3E).%20%3CBR%20%2F%3E%3CTABLE%3E%0A%20%20%20%3CTBODY%3E%3CTR%3E%0A%20%20%20%20%3CTD%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F66981i272E03345A388E9E%22%20%2F%3E%3C%2FTD%3E%0A%20%20%20%20%3CTD%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F66982i6CFF9CCAB79158E1%22%20%2F%3E%3C%2FTD%3E%0A%20%20%20%3C%2FTR%3E%0A%20%20%3C%2FTBODY%3E%3C%2FTABLE%3E%3CBR%20%2F%3E%20Thanks%20to%20this%20approach%2C%20I%E2%80%99ve%20been%20able%20to%20understand%20that%2C%20under%20the%20hood%2C%20the%20VC%2B%2B%20runtime%20installs%20more%20DLLs%20in%20the%20system%20than%20the%20ones%20I%20was%20trying%20to%20manually%20copy%20at%20the%20beginning%20of%20the%20process.%20After%20converting%20the%20batch%20file%2C%20it%20was%20easy%20to%20solve%20the%20problem%3A%20I%20just%20copied%20the%20whole%20content%20of%20the%20VFS%20folder%20inside%20the%20package%20of%20the%20developer%20I%20was%20working%20with%20and%20the%20application%2C%20this%20time%2C%20started%20to%20work%20as%20expected.%20%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId--1768409446%22%20id%3D%22toc-hId--1761793949%22%20id%3D%22toc-hId--1761793949%22%20id%3D%22toc-hId--1761793949%22%20id%3D%22toc-hId--1761793949%22%20id%3D%22toc-hId--1761793949%22%3EWrapping%20up%3C%2FH3%3E%3CBR%20%2F%3E%20In%20this%20post%20I%20used%20a%20%E2%80%9Cfake%E2%80%9D%20setup%20combined%20with%20the%20dependency%20I%20needed%20(the%20VC%2B%2B%2010%20runtime)%20because%20I%20had%20a%20different%20scenario%2C%20but%20of%20course%20this%20approach%20works%20fine%20also%20when%20you%20have%20an%20installer%20you%20need%20to%20convert%2C%20but%20it%20has%20some%20dependencies%20which%20are%20expected%20to%20be%20manually%20downloaded%20from%20the%20user%20and%2C%20as%20such%2C%20they%20aren%E2%80%99t%20included%20as%20part%20of%20the%20setup%20process.%20Just%20create%20a%20batch%20that%20installs%20the%20dependency%20first%20and%20then%20the%20real%20application%20and%20pass%20it%20as%20%E2%80%93%20%3CSTRONG%3EInstaller%20%3C%2FSTRONG%3Eparameter%20of%20the%20Desktop%20App%20Converter%3A%20if%20everything%20works%20as%20expected%2C%20you%20will%20end%20up%20with%20a%20completely%20self-contained%20version%20of%20the%20application.%20Remember%2C%20in%20these%20scenarios%2C%20to%20always%20make%20sure%20to%3A%20%3CBR%20%2F%3E%3COL%3E%3CBR%20%2F%3E%3CLI%3ERead%20the%20license%20of%20the%20framework%20%2F%20library%20%2F%20runtime%20to%20understand%20if%20you%20are%20allowed%20to%20perform%20this%20kind%20of%20repackaging%20and%20distribution.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EKeep%20the%20framework%20%2F%20library%20%2F%20runtime%20up-to-date%2C%20especially%20when%20vendors%20release%20security%20updates%2C%20which%20are%20critical%20to%20keep%20the%20application%20safe.%20This%20is%20a%20general%20rule%20that%20applies%20to%20every%20application%20that%20uses%20a%203rd%20party%20component.%20Every%20time%20a%20new%20update%20is%20released%2C%20you%20should%20incorporate%20it%20in%20the%20VFS%20folder%20of%20the%20package%20and%20test%20your%20application%2C%20to%20make%20sure%20that%20everything%20continues%20to%20work%20as%20expected.%20Then%2C%20submit%20the%20new%20package%20with%20the%20updated%20framework%20on%20the%20Dev%20Center%20or%20distribute%20it%20using%20an%20enterprise%20tool%2C%20so%20that%20every%20user%20of%20your%20application%20will%20automatically%20get%20it.%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FOL%3E%3CBR%20%2F%3E%20Happy%20conversion!%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-316885%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Sep%2011%2C%202017%20One%20of%20the%20key%20requirements%20of%20an%20app%20package%20deployed%20from%20the%20Store%20is%20that%20it%20must%20be%20self-contained%3A%20the%20application%20must%20run%20without%20asking%20to%20the%20user%20to%20manually%20install%20a%20set%20of%20libraries%2C%20a%20framework%20or%20a%20runtime.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-316885%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Edesktop%20bridge%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUniversal%20Windows%20Platform%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-991959%22%20slang%3D%22en-US%22%3ERe%3A%20Chaining%20multiple%20installers%20with%20the%20Desktop%20App%20Converter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-991959%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44595%22%20target%3D%22_blank%22%3E%40Matteo%20Pagani%3C%2FA%3E%26nbsp%3BPlease%20share%20your%20views%20on%20these%20queries%3A%3C%2FP%3E%3CP%3E1)%20Is%20there%20way%20to%20achieve%20the%20same%20(trigger%20a%20chain%20of%20installers%2C%20say%20for%20pre-requisites%20like%20SQL%20Server)%20for%20side%20loaded%20applications%20in%20Visual%20Studio%3F%3C%2FP%3E%3CP%3E2)%20Is%20it%20possible%20via%20PSF%20to%20run%20a%20power%20shell%20script%20to%20trigger%20a%20chain%20of%20installers%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1067884%22%20slang%3D%22en-US%22%3ERe%3A%20Chaining%20multiple%20installers%20with%20the%20Desktop%20App%20Converter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1067884%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20you%20can%20use%20the%20Package%20Support%20Framework%20to%20trigger%20additional%20actions%2C%20as%20explained%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fpsf%2Frun-scripts-with-package-support-framework%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fpsf%2Frun-scripts-with-package-support-framework%3C%2FA%3E%26nbsp%3BHowever%2C%20I%20would%20advise%20against%20this%20approach%20because%20the%20applications%20won't%20be%20installed%20inside%20the%20container%20using%20the%20Virtual%20File%20System%20approach%2C%20leading%20to%20a%20loss%20of%20all%20the%20benefits%20like%20clean%20uninstall.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegarding%20doing%20the%20same%20with%20applications%20packaged%20with%20Visual%20Studio%2C%20the%20answer%20is%20no.%20But%20you%20can%20run%20the%20installers%20with%20the%20MSIX%20Packaging%20Tool%20and%20then%20copy%20only%20the%20relevant%20output%20(like%20the%20.dat%20files%20and%20the%20VFS%20folder)%20inside%20the%20Windows%20Application%20Packaging%20Project.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1080944%22%20slang%3D%22en-US%22%3ERe%3A%20Chaining%20multiple%20installers%20with%20the%20Desktop%20App%20Converter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1080944%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20very%20much%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44595%22%20target%3D%22_blank%22%3E%40Matteo%20Pagani%3C%2FA%3E%26nbsp%3B!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22UserName%20lia-user-name%20lia-user-rank-Microsoft%20lia-component-message-view-widget-author-username%22%3E%3CSPAN%20class%3D%22%22%3ETo%20have%20SQL%20Server%20as%20separate%20package%2C%20which%20would%20be%20more%20appropriate%20-%20Modification%20package%20or%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22UserName%20lia-user-name%20lia-user-rank-Microsoft%20lia-component-message-view-widget-author-username%22%3E%3CSPAN%20class%3D%22%22%3EOptional%20package%3F%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22UserName%20lia-user-name%20lia-user-rank-Microsoft%20lia-component-message-view-widget-author-username%22%3E%3CSPAN%20class%3D%22%22%3EMy%20understanding%20is%20that%20the%20Modification%20package%20would%20be%20the%20right%20choice%20-%20Is%20that%20right%3F%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22UserName%20lia-user-name%20lia-user-rank-Microsoft%20lia-component-message-view-widget-author-username%22%3E%3CSPAN%20class%3D%22%22%3EI%20tried%20including%20the%20required%20VFS%20and%20.dat%20files%20into%20a%20modification%20package.%20But%20then%2C%20on%20installation%2C%20although%20the%20files%20get%20deployed%2C%20SQL%20Server%20service%20doesn't%20run%20-%20Should%20this%20then%20wait%20for%2020H1%20release%2C%20that%20supports%20services%3F%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1080950%22%20slang%3D%22en-US%22%3ERe%3A%20Chaining%20multiple%20installers%20with%20the%20Desktop%20App%20Converter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1080950%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20modification%20packages%20are%20for%20customizations%2C%20not%20for%20full%20applications%20like%20SQL%20Server%2C%20so%20they%20wouldn't%20be%20a%20good%20fit%20for%20this%20scenario.%3C%2FP%3E%0A%3CP%3EI'm%20not%20sure%20SQL%20Server%20is%20a%20good%20candidate%20for%20MSIX%20packaging%2C%20due%20to%20the%20complex%20setup%20requirements%20(the%20whole%20configuration%20of%20the%20SQL%20Server%20instance%20is%20done%20during%20the%20setup%20and%20not%20at%20runtime).%20However%2C%20I%20confirm%20that%2C%20if%20you%20want%20to%20give%20to%20SQL%20Server%20packaging%20a%20short%2C%20you%20will%20need%20to%20package%20it%20using%20the%20latest%20Insider%20preview%20of%20the%20MSIX%20Packaging%20Tool%20(which%20supports%20services%20packaging)%20and%20of%20Windows%2010%2C%20since%20services%20support%20has%20been%20added%20in%2020H1.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft
First published on MSDN on Sep 11, 2017
One of the key requirements of an app package deployed from the Store is that it must be self-contained: the application must run without asking to the user to manually install a set of libraries, a framework or a runtime. If this requirement is easy to satisfy with a regular UWP application, since they fully rely on the Universal Windows Platform that ships with Windows 10, it isn’t necessarily the case when it comes to desktop applications packaged with the Desktop Bridge. These applications, in fact, can be developed using also non-Microsoft technologies, like Java or Electron, or rely on a specific version of a library (like a specific version of DirectX or of the Visual Studio C++ runtime), which aren’t built-in in the operating system.

To solve this problem, usually traditional desktop installers include in the setup process of the application also the installer of the dependency or they trigger a remote download and a separate installation process. However, a Desktop Bridge application can’t use this approach: all the dependencies and required files should be included in the package and installed when the user downloads the app from the Store. The application can’t trigger, when it starts, the execution of a separate installer.

However, in many cases, these frameworks or libraries can’t simply be included as standalone inside the package, because the application looks for them in system folders like Windows, System32, Program Files, etc. To solve this scenario, the Desktop Bridge supports the concept of Virtual File System. Inside a package you can create a folder called VFS , which contains multiple folders that maps the various system folders, by following the naming schema described in the documentation at https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-behind-the-scenes#file-syste...
System location Redirected location under [Package/VFS] Valid on architectures
FOLDERID_SystemX86 SystemX86 x86, amd64
FOLDERID_System SystemX64 amd64
FOLDERID_ProgramFilesX86 ProgramFilesX86 x86, amd6
FOLDERID_ProgramFilesX64 ProgramFilesX64 amd64
FOLDERID_ProgramFilesCommonX86 ProgramFilesCommonX86 x86, amd64
FOLDERID_ProgramFilesCommonX64 ProgramFilesCommonX64 amd64
FOLDERID_Windows Windows x86, amd64
FOLDERID_ProgramData Common AppData x86, amd64
FOLDERID_System\catroot AppVSystem32Catroot x86, amd64
FOLDERID_System\catroot2 AppVSystem32Catroot2 x86, amd64
FOLDERID_System\drivers\etc AppVSystem32DriversEtc x86, amd64
FOLDERID_System\driverstore AppVSystem32Driverstore x86, amd64
FOLDERID_System\logfiles AppVSystem32Logfiles x86, amd64
FOLDERID_System\spool AppVSystem32Spool x86, amd64

Whenever the user will launch your application, Windows will look for the dependencies in the VFS folder first. This approach helps also to solve the problem known as “DLL Hell”, which is very frequent in the desktop world. The term refers to the fact that you may have installed on your computer multiple applications that depends by the same framework or set of libraries. Since they are installed system-wide, all the applications will use the same one. However, this can cause issues if you have, for example, Application A which requires Framework X 1.0, while Application B requires Framework X 2.0. The more recent version can contain, in fact, breaking changes that could lead to Application A to stop working properly or to have issues we aren’t aware of, because we have never tested our application against it.

Thanks to the Virtual File System, each application will leverage its own specific version of the framework or the libraries. This way, if we install an application that requires a more recent version, it won’t break the already installed ones, since they will continue to leverage the libraries embedded in the package and not the system-wide version.


The easiest way to create the proper VFS structure required by the application is to use the Desktop App Converter . As you’ll probably know, this tool runs the traditional desktop installer of your application inside a container, it detects all the changes performed by the setup process (file system, registry keys, etc.) and exports the result into a Universal Windows Package. One of the changes detected by the tool are exactly dependencies: in these cases, the correct VFS infrastructure is automatically recreated inside the package, allowing the application to leverage it in the right way so that it doesn’t require a system-wide version installed on the user’s computer.

However, not all the desktop installers support this feature: there are many scenarios where the user is asked to manually install a dependency before starting the application. For these scenario, there’s an easy solution: chain multiple installers using a single batch file and then use it as a starting point of the Desktop App Converter.

Let’s see a real example!


Creating the batch file


As a sample for this scenario, I’m going to simulate that my application has a dependency from the Visual C++ runtime, specifically from version 10.0. Why using such an old version? If you are a regular reader of this blog, you’ll probably know that Visual C++ libraries are distributed by Microsoft also as Store packages. As such, as we have learned in another post , if your application has a dependency from them, you can simply declare it in the manifest file, like in the following sample:
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.15063.0" />
<PackageDependency Name="Microsoft.VCLibs.110.00.UWPDesktop" MinVersion="11.0.24217.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.24217.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>

This way, when the user installs the application from the Store, if he doesn’t have the Visual C++ libraries on his machine, Windows will take care of automatically downloading them too. However, the Store offers three versions of the library: 11.0, 12.0 and 14.0. As you can see, 10.0 isn’t supported and, as such, we need to use another approach to include it. This approach is exactly using the VFS folder. However, in a real scenario I faced working with a customer, we didn’t have an installer as a starting point, so the first tentative we did was to manually recreate the VFS folder and copy the dependencies from my Windows installation. However, it wasn’t an easy task: we haven’t been able to find a comprehensive list of all the DLLs copied by the Visual C++ runtime installer and the exact location where they are placed. As such, we were stuck in getting an error every the application was launched.

Thanks to a suggestion from Adam Braden from the Dev Platform team, we’ve been able to find a workaround that allowed us to move on and get the packaged application up & running: chain installers. The Desktop App Converter, in fact, doesn’t support just regular installers like a MSI file, but you can pass as – Installer parameter also a batch file. The tool will simply execute all the commands inside the file and then will export the changes. As such, I’ve first downloaded a simple free application ( 7-zip ), in order to have a real setup process that could be executed inside the container, and then I’ve created a batch file that takes care of installing first the application and then VC++ runtime. Here is how the batch files look like:
msiexec /i "7z1701-x64.msi" /quiet /qn /norestart
vcredist_x86.exe /q /norestart

As you can see, it’s simply a plain text file (which you’ll need to save with the .bat extension) that invokes the two installations, one after the other. The only difference compared to when we use the Desktop App Converter directly on a MSI installer is that, in this case, we have to manually specify the parameters which are required to perform a silent installation ( /quiet /qn /norestart ). Since the DAC will receive, as input, a batch file and not a MSI one, it won’t be able to apply automatically these parameters.

Now that you have created the batch file, you simply need to run the Desktop App Converter as usual. The only difference is that the – Installer parameter will point to the batch file and not to a traditional setup, like in the following sample:
DesktopAppConverter -Installer "C:\Users\mpagani\Desktop\VCRedist\setup.bat" -Destination "C:\VCRedist-AppX" -PackageName "VCRedist" -Publisher "CN=mpagani" -Version "1.0.0.0" -Verbose

The DAC will run as usual: the only difference will happen under the hood. After spinning up the container, in fact, the tool will execute the batch file inside it, which will trigger the two installations, one after the other. Only when both of them are completed, the container will be stopped and the tool will export all the changes that have been applied, which will be a merge of the 7-Zip and the VC++ runtime installations. If you open the VFS folder stored inside the PackageFiles folder, which is created in the path that you have set in the – Destination parameter, you will see that our batch worked: the root of the package will contain the 7-zip application’s files, but also a VFS entry with two subfolders that map the system folders where the VC++ runtime has been installed (in this case, ProgramFilesCommonX86 which maps the system folder C:\Program Files (x86) and SystemX86 , which maps the system folder C:\Windows\System32 ).

Thanks to this approach, I’ve been able to understand that, under the hood, the VC++ runtime installs more DLLs in the system than the ones I was trying to manually copy at the beginning of the process. After converting the batch file, it was easy to solve the problem: I just copied the whole content of the VFS folder inside the package of the developer I was working with and the application, this time, started to work as expected.

Wrapping up


In this post I used a “fake” setup combined with the dependency I needed (the VC++ 10 runtime) because I had a different scenario, but of course this approach works fine also when you have an installer you need to convert, but it has some dependencies which are expected to be manually downloaded from the user and, as such, they aren’t included as part of the setup process. Just create a batch that installs the dependency first and then the real application and pass it as – Installer parameter of the Desktop App Converter: if everything works as expected, you will end up with a completely self-contained version of the application. Remember, in these scenarios, to always make sure to:

  1. Read the license of the framework / library / runtime to understand if you are allowed to perform this kind of repackaging and distribution.

  2. Keep the framework / library / runtime up-to-date, especially when vendors release security updates, which are critical to keep the application safe. This is a general rule that applies to every application that uses a 3rd party component. Every time a new update is released, you should incorporate it in the VFS folder of the package and test your application, to make sure that everything continues to work as expected. Then, submit the new package with the updated framework on the Dev Center or distribute it using an enterprise tool, so that every user of your application will automatically get it.


Happy conversion!
4 Comments
Occasional Contributor

@Matteo Pagani Please share your views on these queries:

1) Is there way to achieve the same (trigger a chain of installers, say for pre-requisites like SQL Server) for side loaded applications in Visual Studio?

2) Is it possible via PSF to run a power shell script to trigger a chain of installers?

Microsoft

Hello, you can use the Package Support Framework to trigger additional actions, as explained here: https://docs.microsoft.com/en-us/windows/msix/psf/run-scripts-with-package-support-framework However, I would advise against this approach because the applications won't be installed inside the container using the Virtual File System approach, leading to a loss of all the benefits like clean uninstall.

 

Regarding doing the same with applications packaged with Visual Studio, the answer is no. But you can run the installers with the MSIX Packaging Tool and then copy only the relevant output (like the .dat files and the VFS folder) inside the Windows Application Packaging Project.

Occasional Contributor

Thank you very much @Matteo Pagani !

 

To have SQL Server as separate package, which would be more appropriate - Modification package or Optional package?

My understanding is that the Modification package would be the right choice - Is that right?

I tried including the required VFS and .dat files into a modification package. But then, on installation, although the files get deployed, SQL Server service doesn't run - Should this then wait for 20H1 release, that supports services?

 

Microsoft

Hello, modification packages are for customizations, not for full applications like SQL Server, so they wouldn't be a good fit for this scenario.

I'm not sure SQL Server is a good candidate for MSIX packaging, due to the complex setup requirements (the whole configuration of the SQL Server instance is done during the setup and not at runtime). However, I confirm that, if you want to give to SQL Server packaging a short, you will need to package it using the latest Insider preview of the MSIX Packaging Tool (which supports services packaging) and of Windows 10, since services support has been added in 20H1.