How to run Client Server application with MSIX

%3CLINGO-SUB%20id%3D%22lingo-sub-896534%22%20slang%3D%22en-US%22%3EHow%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-896534%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20make%20an%20MSIX%20run%20with%20a%20client%2Fserver%20application.%20Why%2C%20we%20want%20to%20run%20multiple%20versions%20with%20different%20network%26nbsp%3B%20share%20next%20to%20each%20other.%20They%20use%20the%20same%20registrykeys%20and%20therefor%20we%20want%20to%20use%20MSIX.%20The%20application%20runs%20from%20a%20networkshare%20and%20arranges%20the%20connect%2Factions%20to%20a%20SQL%20database%20and%20license.%20Locally%20on%20the%20pc%20only%20HKLM%2C%20HKCU%20registrykeys%20and%20a%20shortcut%20to%20the%20exe%20on%20the%20share%20are%20needed%20to%20run%20the%20application.%20The%20MSIX%20contains%20the%20registrykeys%20and%20I%20added%20the%20PSFLauncher32.exe%20with%20Config.json%20to%20the%20MSIX%20where%20the%20config.json%20is%20pointing%20to%20the%20%5C%5Cshare%5Cfolder%5Csubfolder%5Capplication.exe.%20I%20can%20see%20the%20exe%20from%20the%20share%20launching%20but%20it%20seems%20that%20the%20legacy%20exe%20starting%20has%20no%20access%20to%20the%20virtual%20registry%20of%20the%20MSIX.%20This%20seems%20logical%20maybe%20but%20in%20this%20case%20it%20is%20not%20what%20I%20want.%20Anybody%20here%20with%20experience%20or%20knowhow%20to%20handle%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1007359%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1007359%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Rudi%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20reaching%20out%2C%20can%20you%20please%20clarify%20your%20scenario.%20What%20are%20you%20trying%20to%20achieve%3F%20Why%20do%20you%20need%20the%20.exe%20to%20be%20on%20a%20network%20share%20and%20not%20inside%20the%20MSIX%20package%3F%20You%20can%20create%20a%20separate%20MSIX%20package%20for%20each%20version%20and%20run%20them%20in%20parallel.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EVlad%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1023537%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1023537%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Vlad%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20for%20the%20late%20response%20but%20I%20had%20an%20issue%20with%20signing%20on%20from%20our%20company.%3C%2FP%3E%3CP%3EThe%20application%20is%20installed%20according%20to%20the%20supplier%E2%80%99s%20rules.%20Which%20means%20that%20the%20main%20application%20is%20on%20a%20network%20share%20folder%20like%20%5C%5Cserver%5Cshare%5Capplicationfolder.%20This%20contains%20a%20small%20client%20installation%20which%20only%20installs%20a%20few%20dll%E2%80%99s%2C%20fonts%2C%20shortcuts%20to%20the%20server-side%20exe%E2%80%99s%20and%20registrykeys%20on%20the%20client%20machine.%3C%2FP%3E%3CP%3EThe%20exe%20file%20is%20on%20the%20server%20share%20and%20moving%20this%20to%20the%20client%20side%20is%20no%20option%20because%20of%20the%20way%20it%20works%20(multiuser%2C%20locking)%20and%20support%20from%20the%20vendor.%20For%20different%20departments%20in%20our%20company%20we%20have%20a%20few%20different%20versions%20running%20from%20different%20shares.%20And%20there%20are%20also%20a%20few%20people%20that%20need%20both%20versions.%20Now%20we%20have%20a%20switch%20mechanism%20for%20these%20people%20to%20adjust%20the%20registry%20each%20time.%3C%2FP%3E%3CP%3EWhat%20do%20I%20want%20to%20achieve.%20Create%20an%20MSIX%20that%20installs%20the%20client%20side%20so%20we%20can%20run%20them%20parallel.%20This%20part%20is%20clear%20and%20no%20problem%20to%20achieve%20that.%3C%2FP%3E%3CP%3EBut%20the%20fact%20that%20the%20server-side%20exe%20is%20outside%20the%20container%20means%20it%20has%20no%20access%20to%20the%20registry%20and%20files%20in%20the%20container.%20And%20my%20guess%20is%20that%20there%20is%20no%20solution%20for%20at%20the%20moment.%20At%20least%20I%20can%E2%80%99t%20find%20it.%20I%20need%20a%20way%20to%20give%20the%20exe%20outside%20the%20container%20access%20to%20the%20registry%2Ffiles%20in%20the%20container.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20Regards%2C%3C%2FP%3E%3CP%3ERudi%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1024684%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1024684%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Rudi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20the%20details%2C%20few%20more%20clarification%20please%3B%3C%2FP%3E%0A%3CP%3EDo%20you%20know%20how%20the%20.exe%20on%20share%20is%20launched%20from%20the%20client%20application%3F%20(e.g.%20CreateProcess)%3C%2FP%3E%0A%3CP%3EDo%20you%20have%20the%20code%20for%20the%20application%20or%20have%20an%20ability%20to%20change%20it%3F%20(I%20know%20typically%20the%20code%20is%20not%20available%20but%20I%20want%20to%20make%20sure%20here)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20again%2C%3C%2FP%3E%0A%3CP%3EVlad%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1025425%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1025425%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Vlad%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20do%20not%20have%20the%20code%20since%20it%20is%20a%20third%20party%20product%20we%20use.%20The%20exe%20on%20the%20share%20is%20started%20with%20a%20simple%20shortcut%20that%20is%20locally%20on%20the%20pc.%20I%20put%20the%20shortcut%20into%20the%20MSIX%20file.%3C%2FP%3E%3CP%3EMaybe%20it%20makes%20sense%20that%20an%20external%20exe%20has%20no%20access%20to%20the%20containers%20registry%20or%20files%20in%20terms%20of%20security.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%2FRudi%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1034796%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1034796%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Rudi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20clarifying%2C%20we%20don't%20support%20it%20via%20a%20shortcut%20today%2C%20can%20you%20please%20share%20how%20do%20you%20run%20the%20shortcut%20from%20within%20the%20MSIX%20package%3F%3C%2FP%3E%0A%3CP%3EAs%20an%20FYI%20-%20We%20do%20support%20running%20an%20.exe%20from%20outside%20the%20package%20within%20the%20container%20via%20CreateProcessAsUser%20function%20via%20the%26nbsp%3BPROC_THREAD_ATTRIBUTE_DESKTOP_APP_POLICY%20attribute%20but%20it%20is%20more%20of%20a%20developer%20scenario%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fwindows%2Fdesktop%2Fms686880(v%3Dvs.85).aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fwindows%2Fdesktop%2Fms686880(v%3Dvs.85).aspx%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EVlad%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1035399%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1035399%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Vlad%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20shortcut%20is%20launched%20by%20the%20user%20and%20points%20directly%20to%20the%20exe%20on%20the%20fileshare%20like%20%22%5C%5Cserver%5Cshare%5Cfolder%5Csubfolder%5Crunthis.exe%22.%20I%20read%20the%20developer%20info%20but%20think%20that%20is%20a%20bit%20to%20far%20for%20us.%20Also%20I%20am%20not%20fond%20of%20using%20all%20kind%20of%20custom%20things.%20If%20things%20change%20which%20will%20be%20the%20case%20with%20MSIX%20it%20might%20not%20work%20anymore.%20I%20think%20the%20conclusion%20for%20now%20is%20that%20this%20is%20not%20suitable%20yet%20to%20use%20in%20an%20enterprise%20environment.%3C%2FP%3E%3CP%3EOr%20am%20I%20wrong%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1036770%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1036770%22%20slang%3D%22en-US%22%3EYes%2C%20you%20are%20right%2C%20we%20don't%20support%20this%20scenario%20yet.%20I%20will%20capture%20it.%3CBR%20%2F%3EOne%20more%20clarification%20please%2C%20how%20the%20user%20finds%20the%20shortcut%20if%20you%20deploy%20it%20with%20the%20MSIX%20package%20(it%20will%20be%20under%20the%20WindowsApps%20folder%20that%20a%20regular%20user%20don't%20have%20permissions%20for)%3F%20Are%20you%20coping%20it%20to%20the%20desktop%20when%20the%20app%20starts%3F%20%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3EVlad%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1039630%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1039630%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Vlad%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20forgot%20to%20say%20that%20for%20the%20shortcut%20I%20use%20a%20man%20in%20the%20middle%20exe%20made%20by%20Winbatch%20compiler.%20It%20only%20contains%20the%20exepath%20and%20wortking%20folder%20and%20runs%20that.%20So%20the%20shortcut%20points%20towards%20an%20exe%20local%20in%20the%20container%20and%20that%20exe%20starts%20the%20exe%20on%20the%20share.%3C%2FP%3E%3CP%3EThat%20is%20how%20I%20got%20the%20shortcut.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1047506%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1047506%22%20slang%3D%22en-US%22%3EHi%20Rudi%2C%3CBR%20%2F%3E%3CBR%20%2F%3EDid%20you%20create%20the%20shortcut%20outside%20the%20MSIX%20package%20on%20the%20desktop%3F%20(Otherwise%20if%20it%20is%20inside%20the%20MSIX%20package%20the%20user%20won't%20have%20access%20to%20it).%20Also%2C%20to%20point%20to%20the%20man%20in%20the%20middle%20.exe%20inside%20the%20MSIX%20package%20you%20have%20to%20create%20an%20appExecutionAlias%20for%20the%20application%20and%20set%20it%20is%20the%20Targetpath%20in%20the%20shortcut%20-%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fapps%2Fdesktop%2Fmodernize%2Fdesktop-to-uwp-extensions%23elements-and-attributes-of-this-extension-15%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%2Fapps%2Fdesktop%2Fmodernize%2Fdesktop-to-uwp-extensions%23elements-and-attributes-of-this-extension-15%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3EVlad%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1158743%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1158743%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F246129%22%20target%3D%22_blank%22%3E%40RRobesin%3C%2FA%3E%26nbsp%3Bhave%20you%20tried%26nbsp%3B%3CSPAN%3EPSFLauncher64.exe%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1167720%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20run%20Client%20Server%20application%20with%20MSIX%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1167720%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F145709%22%20target%3D%22_blank%22%3E%40Dan%20Gough%3C%2FA%3E%20PsfLauncher%20(currently)%20would%20use%20the%20standard%20process%20launcher%20causing%20the%20exe%20to%20run%20outside%20of%20the%20container%20and%20not%20see%20the%20needed%20registry%20settings.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EVlad's%20note%20opens%20the%20possibility%20that%20in%20the%20future%20we%20could%20add%20a%20PsfLauncher%20option%20in%20the%20config.json%20to%20allow%20support%20for%20this%20scenario.%26nbsp%3B%20I%20might%20look%20into%20adding%20it%20to%20the%20Psf%20over%20the%20summer%2C%20but%20I'd%20first%20have%20to%20verify%20that%20it%20does%20not%20require%20developer%20mode%20(which%20is%20the%20problem%20with%20the%20PowerShell%20command%20to%20launch%20inside%20the%20container).%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I am trying to make an MSIX run with a client/server application. Why, we want to run multiple versions with different network  share next to each other. They use the same registrykeys and therefor we want to use MSIX. The application runs from a networkshare and arranges the connect/actions to a SQL database and license. Locally on the pc only HKLM, HKCU registrykeys and a shortcut to the exe on the share are needed to run the application. The MSIX contains the registrykeys and I added the PSFLauncher32.exe with Config.json to the MSIX where the config.json is pointing to the \\share\folder\subfolder\application.exe. I can see the exe from the share launching but it seems that the legacy exe starting has no access to the virtual registry of the MSIX. This seems logical maybe but in this case it is not what I want. Anybody here with experience or knowhow to handle this?

11 Replies

Hi Rudi,

Thanks for reaching out, can you please clarify your scenario. What are you trying to achieve? Why do you need the .exe to be on a network share and not inside the MSIX package? You can create a separate MSIX package for each version and run them in parallel. 

 

Regards,

Vlad

 

Hi Vlad,

 

Sorry for the late response but I had an issue with signing on from our company.

The application is installed according to the supplier’s rules. Which means that the main application is on a network share folder like \\server\share\applicationfolder. This contains a small client installation which only installs a few dll’s, fonts, shortcuts to the server-side exe’s and registrykeys on the client machine.

The exe file is on the server share and moving this to the client side is no option because of the way it works (multiuser, locking) and support from the vendor. For different departments in our company we have a few different versions running from different shares. And there are also a few people that need both versions. Now we have a switch mechanism for these people to adjust the registry each time.

What do I want to achieve. Create an MSIX that installs the client side so we can run them parallel. This part is clear and no problem to achieve that.

But the fact that the server-side exe is outside the container means it has no access to the registry and files in the container. And my guess is that there is no solution for at the moment. At least I can’t find it. I need a way to give the exe outside the container access to the registry/files in the container.

 

Kind Regards,

Rudi

Hi Rudi,

 

Thanks for the details, few more clarification please;

Do you know how the .exe on share is launched from the client application? (e.g. CreateProcess)

Do you have the code for the application or have an ability to change it? (I know typically the code is not available but I want to make sure here)

 

Thanks again,

Vlad

Hi Vlad,

 

I do not have the code since it is a third party product we use. The exe on the share is started with a simple shortcut that is locally on the pc. I put the shortcut into the MSIX file.

Maybe it makes sense that an external exe has no access to the containers registry or files in terms of security.

 

/Rudi

Hi Rudi,

 

Thanks for clarifying, we don't support it via a shortcut today, can you please share how do you run the shortcut from within the MSIX package?

As an FYI - We do support running an .exe from outside the package within the container via CreateProcessAsUser function via the PROC_THREAD_ATTRIBUTE_DESKTOP_APP_POLICY attribute but it is more of a developer scenario - https://msdn.microsoft.com/en-us/library/windows/desktop/ms686880(v=vs.85).aspx 

 

Vlad

Hi Vlad,

 

The shortcut is launched by the user and points directly to the exe on the fileshare like "\\server\share\folder\subfolder\runthis.exe". I read the developer info but think that is a bit to far for us. Also I am not fond of using all kind of custom things. If things change which will be the case with MSIX it might not work anymore. I think the conclusion for now is that this is not suitable yet to use in an enterprise environment.

Or am I wrong?

Yes, you are right, we don't support this scenario yet. I will capture it.
One more clarification please, how the user finds the shortcut if you deploy it with the MSIX package (it will be under the WindowsApps folder that a regular user don't have permissions for)? Are you coping it to the desktop when the app starts?

Thanks,
Vlad

Hi Vlad,

 

I forgot to say that for the shortcut I use a man in the middle exe made by Winbatch compiler. It only contains the exepath and wortking folder and runs that. So the shortcut points towards an exe local in the container and that exe starts the exe on the share.

That is how I got the shortcut.

Hi Rudi,

Did you create the shortcut outside the MSIX package on the desktop? (Otherwise if it is inside the MSIX package the user won't have access to it). Also, to point to the man in the middle .exe inside the MSIX package you have to create an appExecutionAlias for the application and set it is the Targetpath in the shortcut - https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-extensions#elements-a...

Thanks,
Vlad

@RRobesin have you tried PSFLauncher64.exe?

@Dan Gough PsfLauncher (currently) would use the standard process launcher causing the exe to run outside of the container and not see the needed registry settings.

 

Vlad's note opens the possibility that in the future we could add a PsfLauncher option in the config.json to allow support for this scenario.  I might look into adding it to the Psf over the summer, but I'd first have to verify that it does not require developer mode (which is the problem with the PowerShell command to launch inside the container).