[UWP][C#]Preinstall UWP package: using code "AppServiceConnection.OpenAsync()" return wrong status RRS feed

  • Question

  • I want to preinstall UWP package by command through "Aduit mode", the command as following:
    dism /online /Add-ProvisionedAppxPackage /PackagePath:"%~dp01feceb3035eb4fb4b45be6c7b90eb8c1.appxbundle"  /DependencyPackagePath:"%~dp0Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x86__8wekyb3d8bbwe.appx"  /DependencyPackagePath:"%~dp0Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x86__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Microsoft.VCLibs.140.00_14.0.25426.0_x64__8wekyb3d8bbwe.appx" /DependencyPackagePath:"%~dp0Microsoft.VCLibs.140.00_14.0.25426.0_x86__8wekyb3d8bbwe.appx" /LicensePath:"%~dp01feceb3035eb4fb4b45be6c7b90eb8c1_License1.xml"

    The UWP program contains "runFullProcess" feature, I try the code in win32 as following:
    var connection = new AppServiceConnection();
    connection.AppServiceName = "RegistrationService";
    connection.PackageFamilyName = TargetPackageFamilyName;
    var connectionStatus = await connection.OpenAsync();
    But I got the error status "AppNotInstalled". And Never got correct status "Success" until recovery system.

    After recovering system, I try two ways as following:
    1. install UWP package through appxbundle.
    2. install UWP package through Windows Store.
    This can get correct status "Success".

    Please help me to resolve the issue. Thanks.
    • Edited by Lena-Ke Monday, November 27, 2017 9:24 AM
    • Moved by Xavier Xie-MSFT Tuesday, November 28, 2017 8:08 AM not uwp development issue
    Monday, November 27, 2017 5:36 AM

All replies

  • Hi Lena-ke

    Since the problem is no related to deveplop UWP apps, it is out of the scope of our forum. I suggest that you might need ask about this in other place.

    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, November 28, 2017 8:07 AM