none
[UWP] Allow win32 excel application to open file in kiosk mode RRS feed

  • Question

  • Hi,

    I'm trying to develop an UWP application for Windows 10 in kiosk mode.

    I'm trying to open excel desktop app via LaunchFile in my UWP C# app like in this example :

    var picker = new FileOpenPicker();
                    picker.ViewMode = PickerViewMode.Thumbnail;
                    picker.SuggestedStartLocation = PickerLocationId.ComputerFolder;
                    picker.FileTypeFilter.Add(".txt");
                    picker.FileTypeFilter.Add(".xls");
                    picker.FileTypeFilter.Add(".xlsx");
                    picker.FileTypeFilter.Add(".xlsm");
                    picker.FileTypeFilter.Add(".doc");
                    picker.FileTypeFilter.Add(".docx");
                    picker.FileTypeFilter.Add(".pdf");
                    StorageFile file = await picker.PickSingleFileAsync();
                    if (file != null)
                    {
                        var promptOptions = new LauncherOptions();
                        promptOptions.DisplayApplicationPicker = true;
                        var success = await Launcher.LaunchFileAsync(file, promptOptions);
                        if (success)
                        {
                            message.Text = $"Launch file {file.Name} success";
                        }
                        else
                        {
                            message.Text = $"Launch file {file.Name} error";
                        }
                    }
                    else
                    {
                        filePick.Text = "Operation cancelled";
                    }

    What i see in my tests:

    - In standard Win10 mode, excel files (xls, xlsx, ...) is opened correctly,

    - In kiosk mode excel files is not opened => what i see in other thread is that for file associated with desktop app, this file is passes using shell execution mechanisms which seems to be blocked / restricted.

    Do I need to add some authorizations in my AssignedAccessConfiguration file like "App DesktopAppPath=XXX" or other things ?

    Thanks for your help !

    Regards

    Thursday, September 12, 2019 2:13 PM

All replies

  • Hi,

    Prior to Windows 1709, Kiosk mode could only run a single application.

    After that, Windows allows multiple applications to run, you can add Excel to the AssignedAccessConfiguration.

    This is a document about running multiple apps and it should help you.

    Best regards.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, September 13, 2019 1:42 AM
  • Hi,

    Thank you for your reply.

    Unfortunately we are already used windows 10 1803 in kiosk multi app mode. We've already defined in the AssignedAccessConfiguration file the authorization for excel like that:

     <AllAppsList>
                    <AllowedApps>
                        <App AppUserModelId="00d942cd-665a-4b7a-ba27-2f2b9c0d2792_kwmcxzszfer2y!App" />
         <App AppUserModelId="6c79869e-f250-405b-8134-f44c2fc1ef5d_kwmcxzszfer2y!App" />
         <App AppUserModelId="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge" />
         <App DesktopAppPath="%SystemDrive%\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" />
                    </AllowedApps>
    </AllAppsList>

    When we try to launch an application by the code in my previous sample excel (desktop app) is not launched.

    I don't understand the behaviour because when we choose pdf file, the popup ask what kind of application we want to use (it's opened by edge process which is autorized). For excel files, we don't have the popup visible it seems that excel is not authorized. Does excel have sub process to be added in the AssignedAccessConfiguration ?

    Best regards


    Monday, September 16, 2019 8:29 AM
  • Hello,

    I have asked the engineer for help on this issue, he will track your problem and help you solve it.

    Thank you for your support.

    Best regards.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 18, 2019 1:37 AM
  • Hi,

    Thank you for your help.

    I can send my program if you want. It's very important for my company to make this work !

    Best regards.

    Wednesday, September 18, 2019 11:50 AM
  • Hi,

    Thank you for your support, if you can provide a reproducible demo is the best.

    Best regards.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, September 23, 2019 7:24 AM
  • Hi,

    This is my github repository :

    https://github.com/Wheelskad/uwp_kiosk_app

    Best regards.

    Monday, September 23, 2019 12:52 PM
  • Hi,

    Thank you for the project you provided, our engineers will test the project, thank you for your support.

    Best regards.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 24, 2019 7:52 AM
  • Hi,

    Thank you. I'm waiting for your feedback.

    Best regards.

    Tuesday, September 24, 2019 3:42 PM
  • Hi,

    Have you some feedback from your team ?

    Best regards,

    Monday, September 30, 2019 8:52 AM
  • Hi,

    No, we haven't get any response from our team yet. There might be some time delay.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 1, 2019 6:16 AM
    Moderator
  • Hi,

    Have you got any feedback, I'm still interested :)

    Thanks in advance.

    Best regards,

    Tuesday, October 8, 2019 2:57 PM
  • Hi Nathan,

    Thanks for the question. I hope you're doing well. This post is a duplicate (or vice versa) of your question on another thread: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/92699c7b-3d82-46be-9753-ed6619ce133b/windows-10-1809-kiosk-mode-assigned-access-uwp-application-win32-apps?forum=wpdevelop

    I shared my solution there. Can you review the answer there. If this doesn't work for you, I have your code and allowed apps xml snippet, but it will help to see the full config file, ppkg and where you have excel installed. Please also share the version of Windows 10 you're having trouble with. I tested this on 1903 with my project targeting 18362.

    If you run this "%SystemDrive%\Program Files\Microsoft Office\root\Office16\EXCEL.EXE" from your command line (in desktop mode), do you see that Excel launches. It's possible your installation is in Program Files (x86) so it's worth checking if this is the proper path. Also, you may want to use the program files environment variables instead of system drive. %ProgramFiles% for x64 apps and %ProgramFiles(x86)% for x86 apps. You'll see in the example I gave, I used this environment variable to confirm that environment variables are okay in the config path.

    Additionally, from your question here, I see you mentioned 
    AssignedAccessConfiguration instead of the MultiAppAssignedAccessConfiguration configuration in the Windows Configuration Designer. The value for the multi app config should point to your XML; I did not set anything for the AssignedAccessConfiguration since that one is for single app kiosk mode.

    I did notice that your other post mentions 1809. If this is working for you in 1903, but still failing in 1809, would updating to 1903 or 1909 be a viable solution?



    -David Hollowell (MSFT) Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to others in our community who may also be reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.








    9 hours 20 minutes ago
    Moderator