简体   繁体   中英

VpnManagementAgent always returns zero profiles plus I can't seem to create new ones

Note the second example below that one is in C++.

Note the third example is in C#.

Ok after a bit of digging it seems that the problem may lay in some sort of permission issue as after debugging the binaries and skipped some random check - it showed the single profile I've for my account. Yeah there are calls to GetCurrentPackageFamilyName definitely it's querying some sort of permissions.

It's not my fault there is no background information - the only public docs are here . I'm just trying to ping the interface.

The C variant is complex because I have to call RoCreateInstance then Inspectable_QueryInterface and also to define my own IIDs since the original ones are missing . Also I need to create my own strings with WindowsCreateStringReference and also a custom COM handler. It doesn't help the names included from the header are thousands characters long.

Basically I try to add a profile from both VPNProfile interface I query and fill and XML - non of those attempts work. Recently I was able to update however an existing profile from object.

However I also can't seem to connect to one and disconnect.

The only useful thing I can do with said interface is UpdateProfileFromXmlAsync which crashes the app:

#define COBJMACROS
#include <roapi.h>
#include <windows.networking.vpn.h>
#include <stdbool.h>
#include <stdio.h>

//Had to manually define my IIDs
//because the definitions are missing from the library

const IID IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent = {0x193696CD,0xA5C4,0x4ABE,0x85,0x2B,0x78,0x5B,0xE4,0xCB,0x3E,0x34};

const IID IID___FIAsyncOperationCompletedHandler_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile = {0xdac6dd72,0xa5d1,0x56d4,0xaf,0xc4,0x98,0x9f,0x84,0xdc,0xb2,0xb3};

const IID IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile = {0x7875B751,0xB0D7,0x43DB,0x8A,0x93,0xD3,0xFE,0x24,0x79,0xE5,0x6A};

const IID IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnNativeProfile = {0xA4AEE29E,0x6417,0x4333,0x98,0x42,0xF0,0xA6,0x6D,0xB6,0x98,0x02};

const IID IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnChannel = {0x4AC78D07,0xD1A8,0x4303,0xA0,0x91,0xC8,0xD2,0xE0,0x91,0x5B,0xC3};

const IID IID___FIAsyncOperationCompletedHandler_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus = {0x31229f8c,0x709d,0x5017,0x86,0x29,0x57,0xef,0x12,0x89,0xe6,0x16};

const WCHAR pVPNXmlCode[] = 

L"<SyncML xmlns=\"SYNCML:SYNCML1.2\" xmlns:A=\"syncml:metinf\">"
L"  <SyncBody>"
L"    <Atomic>"
L"      <CmdID>10000</CmdID>"
L""
L"      <!-- Configure VPN Server Name or Address (PhoneNumber=) [Comma Separated]-->"
L"      <Add>"
L"        <CmdID>10001</CmdID>"
L"        <Item>"
L"          <Target>"
L"            <LocURI>./Vendor/MSFT/VPNv2/VPN_Demo/ProfileXML</LocURI>"
L"          </Target>"
L"          <Data><VPNProfile>"
L"  <ProfileName>VPN_Demo</ProfileName>"
L"  <NativeProfile>"
L"    <Servers>VPNServer.contoso.com</Servers>"
L"    <NativeProtocolType>Automatic</NativeProtocolType>"
L"    <Authentication>"
L"      <UserMethod>Eap</UserMethod>"
L"      <Eap>"
L"        <Configuration>"
L"<EapHostConfig xmlns=\"http://www.microsoft.com/provisioning/EapHostConfig\"> <EapMethod> <Type xmlns=\"http://www.microsoft.com/provisioning/EapCommon\">25</Type> <VendorId xmlns=\"http://www.microsoft.com/provisioning/EapCommon\">0</VendorId> <VendorType xmlns=\"http://www.microsoft.com/provisioning/EapCommon\">0</VendorType> <AuthorId xmlns=\"http://www.microsoft.com/provisioning/EapCommon\">0</AuthorId> </EapMethod> <Config xmlns=\"http://www.microsoft.com/provisioning/EapHostConfig\"> <Eap xmlns=\"http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1\"> <Type>25</Type> <EapType xmlns=\"http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV1\"> <ServerValidation> <DisableUserPromptForServerValidation>false</DisableUserPromptForServerValidation> <ServerNames></ServerNames> </ServerValidation> <FastReconnect>true</FastReconnect> <InnerEapOptional>false</InnerEapOptional> <Eap xmlns=\"http://www.microsoft.com/provisioning/BaseEapConnectionPropertiesV1\"> <Type>13</Type> <EapType xmlns=\"http://www.microsoft.com/provisioning/EapTlsConnectionPropertiesV1\"> <CredentialsSource> <CertificateStore> <SimpleCertSelection>false</SimpleCertSelection> </CertificateStore> </CredentialsSource> <ServerValidation> <DisableUserPromptForServerValidation>false</DisableUserPromptForServerValidation> <ServerNames></ServerNames> </ServerValidation> <DifferentUsername>false</DifferentUsername> <PerformServerValidation xmlns=\"http://www.microsoft.com/provisioning/EapTlsConnectionPropertiesV2\">false</PerformServerValidation> <AcceptServerName xmlns=\"http://www.microsoft.com/provisioning/EapTlsConnectionPropertiesV2\">false</AcceptServerName> <TLSExtensions xmlns=\"http://www.microsoft.com/provisioning/EapTlsConnectionPropertiesV2\"> <FilteringInfo xmlns=\"http://www.microsoft.com/provisioning/EapTlsConnectionPropertiesV3\"> <EKUMapping> <EKUMap> <EKUName>Unknown Key Usage</EKUName> <EKUOID>1.3.6.1.4.1.311.87</EKUOID> </EKUMap> </EKUMapping> <ClientAuthEKUList Enabled=\"true\"> <EKUMapInList> <EKUName>Unknown Key Usage</EKUName> </EKUMapInList> </ClientAuthEKUList> </FilteringInfo> </TLSExtensions> </EapType> </Eap> <EnableQuarantineChecks>false</EnableQuarantineChecks> <RequireCryptoBinding>false</RequireCryptoBinding> <PeapExtensions> <PerformServerValidation xmlns=\"http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2\">false</PerformServerValidation> <AcceptServerName xmlns=\"http://www.microsoft.com/provisioning/MsPeapConnectionPropertiesV2\">false</AcceptServerName> </PeapExtensions> </EapType> </Eap> </Config> </EapHostConfig>"
L"    </Configuration>"
L"      </Eap>"
L"    </Authentication>"
L"    <RoutingPolicyType>SplitTunnel</RoutingPolicyType>"
L"  </NativeProfile>"
L"  <DomainNameInformationList>"
L"    <DomainName>.contoso.com</DomainName>"
L"    <DNSServers>10.5.5.5</DNSServers>"
L"  </DomainNameInformationList>"
L" <TrafficFilter>  "
L"    <App>%ProgramFiles%Internet Exploreriexplore.exe</App> "
L"  </TrafficFilter> "
L"  <TrafficFilter>  "
L"    <App>Microsoft.MicrosoftEdge_8wekyb3d8bbwe</App>  "
L"  </TrafficFilter>"
L"  <Route>"
L"    <Address>10.0.0.0</Address>"
L"    <PrefixSize>8</PrefixSize>"
L"  </Route>"
L"  <Route>"
L"    <Address>25.0.0.0</Address>"
L"    <PrefixSize>8</PrefixSize>"
L"  </Route>"
L"    <RememberCredentials>true</RememberCredentials>"
L"  </VPNProfile></Data>"
L"        </Item>"
L"      </Add>"
L""
L"    </Atomic>"
L"    <Final/>"
L"  </SyncBody>"
L"</SyncML>"

;


//Completion Handlers


HRESULT QueryInterface(This,riid,ppvObject)void * This;REFIID riid;void **ppvObject; {if(!ppvObject) return E_POINTER;
    return !memcmp(riid, &IID_IUnknown, sizeof *riid) || 
    !memcmp(riid, &IID___FIAsyncOperationCompletedHandler_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus, sizeof *riid) ||
    !memcmp(riid, &IID___FIAsyncOperationCompletedHandler_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile, sizeof *riid) ? *ppvObject=This, S_OK 
    : E_NOINTERFACE;}
HANDLE hReady;
(AddRef)(in) void*in; {;}
(Release)(in) void*in; {;}

__x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile *pProfile;

        //Error Handler
HRESULT (InvokeError)(in,asyncInfo,status) void*in;
__FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus *asyncInfo;AsyncStatus status;
{
    enum __x_ABI_CWindows_CNetworking_CVpn_CVpnManagementErrorStatus disconnectstatus;
    __FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus_GetResults(asyncInfo,&disconnectstatus);
    printf("SET0:%d\n%x\n",disconnectstatus, GetLastError()),SetEvent(hReady);
    return S_OK;}

        //Profile Sets Handler
HRESULT (InvokeCollect)(in,asyncInfo,status) void*in;
__FIAsyncOperation_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile *asyncInfo;AsyncStatus status;
{__FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile *pResults;
    unsigned int size;
    printf("SET1:%d\n",status),
    printf("%x\n",__FIAsyncOperation_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile_GetResults(asyncInfo, &pResults)),
    __FIAsyncOperation_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile_Release(asyncInfo),
    __FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile_get_Size(pResults,&size),
    printf("Amount of profiles collected %d\n",size),
    __FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile_Release(pResults),
    SetEvent(hReady);return S_OK;}


__FIAsyncOperationCompletedHandler_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile ProfilesRetrieverHandler = 
{(__FIAsyncOperationCompletedHandler_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfileVtbl[1])
        {{QueryInterface,AddRef,Release,InvokeError}}};

(main)()

//Long complex,boring initialization
{__x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent *pVpnMan; HSTRING_HEADER header;
    ULONG idCount; IID*pIdds;
    hReady = CreateEvent(0,true,false,0); __x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile *pProfile;
    __x_ABI_CWindows_CNetworking_CVpn_CIVpnNativeProfile *pNativeProfile;
    ULONG strSize; WCHAR *pRawString;__x_ABI_CWindows_CNetworking_CVpn_CIVpnChannel *pChannel;
    enum __x_ABI_CWindows_CNetworking_CVpn_CVpnManagementErrorStatus disconnectstatus;
    __FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus *pVpnManErr;
    IInspectable *pVpnObjInspect; HSTRING string; RoInitialize(RO_INIT_MULTITHREADED),

    //Query for IVpnManagementAgent
    WindowsCreateStringReference(RuntimeClass_Windows_Networking_Vpn_VpnManagementAgent,
        sizeof RuntimeClass_Windows_Networking_Vpn_VpnManagementAgent/sizeof(WCHAR)-1,
        &header, &string), RoActivateInstance(string,&pVpnObjInspect), WindowsDeleteString(string), IInspectable_QueryInterface(pVpnObjInspect,
        &IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent,&pVpnMan),IInspectable_Release(pVpnObjInspect), 


        //Query for IVpnProfile
        WindowsCreateStringReference(RuntimeClass_Windows_Networking_Vpn_VpnNativeProfile,
        sizeof RuntimeClass_Windows_Networking_Vpn_VpnNativeProfile/sizeof(WCHAR)-1,
        &header, &string), RoActivateInstance(string,&pVpnObjInspect),WindowsDeleteString(string),IInspectable_GetIids(pVpnObjInspect,&idCount,&pIdds),
        IInspectable_QueryInterface(pVpnObjInspect, &IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile,&pProfile),IInspectable_Release(pVpnObjInspect),

        //Set Profile name to currently active VPN Profile in my system
        WindowsCreateStringReference(pVPNXmlCode, sizeof pVPNXmlCode/sizeof(WCHAR)-1,&header, &string),WindowsCreateStringReference(L"VPN Connection",
            sizeof L"VPN Connection"/sizeof(WCHAR)-1,&header, &string),__x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile_put_ProfileName(pProfile,string),
        WindowsDeleteString(string),

        //Query to IVpnNativeProfile and the back to IVpnProfile - because I can
        printf("%x\n",__x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile_QueryInterface(pProfile,&IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnNativeProfile,&pNativeProfile)),
        __x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile_Release(pProfile),
        printf("%x\n",__x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile_QueryInterface(pNativeProfile,&IID___x_ABI_CWindows_CNetworking_CVpn_CIVpnProfile,&pProfile)),
        __x_ABI_CWindows_CNetworking_CVpn_CIVpnNativeProfile_Release(pNativeProfile),


        //The interesting part


        //Try to add profile from XML

        WindowsCreateStringReference(pVPNXmlCode,sizeof pVPNXmlCode/
        sizeof(WCHAR)-1,&header, &string),__x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent_AddProfileFromXmlAsync(pVpnMan,string,&pVpnManErr),
        WindowsDeleteString(string),__FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus_put_Completed(pVpnManErr,&ProfilesRetrieverHandler),
        WaitForSingleObject(hReady, INFINITE), ResetEvent(hReady),

        //Try to add profie from previously queried profile
        __x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent_AddProfileFromObjectAsync(pVpnMan,pProfile,&pVpnManErr),
        __FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus_put_Completed(pVpnManErr,&ProfilesRetrieverHandler),
        WaitForSingleObject(hReady, INFINITE), ResetEvent(hReady),

        //See how many profiles we have
        ProfilesRetrieverHandler.lpVtbl->Invoke = InvokeCollect;
        __FIAsyncOperation_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile *pProfiles;
        __x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent_GetProfilesAsync(pVpnMan,&pProfiles),
        __FIAsyncOperation_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile_put_Completed(pProfiles,&ProfilesRetrieverHandler),
        __FIAsyncOperation_1___FIVectorView_1_Windows__CNetworking__CVpn__CIVpnProfile_Release(pProfiles),
        WaitForSingleObject(hReady, INFINITE),ResetEvent(hReady);

        //Try connectiong to our previously named profile
        ProfilesRetrieverHandler.lpVtbl->Invoke = InvokeError,
        __x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent_ConnectProfileAsync(pVpnMan,pProfile,&pVpnManErr),
        __FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus_put_Completed(pVpnManErr,&ProfilesRetrieverHandler),
        __FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus_Release(pVpnManErr),
        WaitForSingleObject(hReady, INFINITE),ResetEvent(hReady);

        //For fun crash the application
        ProfilesRetrieverHandler.lpVtbl->Invoke = InvokeError,
        WindowsCreateStringReference(pVPNXmlCode,sizeof pVPNXmlCode/
        sizeof(WCHAR)-1,&header, &string),__x_ABI_CWindows_CNetworking_CVpn_CIVpnManagementAgent_UpdateProfileFromXmlAsync(pVpnMan,string,&pVpnManErr),
        WindowsDeleteString(string),
        __FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus_put_Completed(pVpnManErr,&ProfilesRetrieverHandler),
        __FIAsyncOperation_1_Windows__CNetworking__CVpn__CVpnManagementErrorStatus_Release(pVpnManErr),
        WaitForSingleObject(hReady, INFINITE),ResetEvent(hReady);

        printf("never reached\n");

}

Here is how I compile the above:

cl stackoverflow.c /link RuntimeObject.lib Ole32.lib OleAut32.lib

Here is my C++ variant for anyone who can't look at the above code:

#include <stdio.h>
#include <..\cppwinrt\winrt\windows.networking.vpn.h>
using namespace winrt::Windows::Networking::Vpn;

const wchar_t pVPNXmlCode[] = 

L"<SyncML xmlns=\"SYNCML:SYNCML1.2\" xmlns:A=\"syncml:metinf\">"
L"  <SyncBody>"
L"    <Atomic>"
L"      <CmdID>10000</CmdID>"
L""
L"      <!-- Configure VPN Server Name or Address (PhoneNumber=) [Comma Separated]-->"
L"      <Add>"
L"        <CmdID>10001</CmdID>"
L"        <Item>"
L"          <Target>"
L"            <LocURI>./Vendor/MSFT/VPNv2/VPN_Demo/ProfileXML</LocURI>"
L"          </Target>"      
L"          <Data><VPNProfile>"
L"  <ProfileName>VPN_Demo</ProfileName>"
L"  <NativeProfile>"
L"    <Servers>VPNServer.contoso.com</Servers>"
L"    <NativeProtocolType>Automatic</NativeProtocolType>"
L"    <Authentication>"
L"      <UserMethod>Eap</UserMethod>"
L"    </Authentication>"
L"    <RoutingPolicyType>SplitTunnel</RoutingPolicyType>"
L"  </NativeProfile>"
L"  <DomainNameInformationList>"
L"    <DomainName>.contoso.com</DomainName>"
L"    <DNSServers>10.5.5.5</DNSServers>"
L"  </DomainNameInformationList>"
L" <TrafficFilter>  "
L"    <App>%ProgramFiles%Internet Exploreriexplore.exe</App> "
L"  </TrafficFilter> "
L"  <TrafficFilter>  "
L"    <App>Microsoft.MicrosoftEdge_8wekyb3d8bbwe</App>  "
L"  </TrafficFilter>"
L"  <Route>"
L"    <Address>10.0.0.0</Address>"
L"    <PrefixSize>8</PrefixSize>"
L"  </Route>"
L"  <Route>"
L"    <Address>25.0.0.0</Address>"
L"    <PrefixSize>8</PrefixSize>"
L"  </Route>"
L"    <RememberCredentials>true</RememberCredentials>"
L"  </VPNProfile></Data>"
L"        </Item>"
L"      </Add>"
L""
L"    </Atomic>"
L"    <Final/>"
L"  </SyncBody>"
L"</SyncML>"

;

int wmain()
{
    winrt::init_apartment();
    VpnNativeProfile profile;
profile.AlwaysOn(false);
profile.EapConfiguration(L"<EapHostConfig></EapHostConfig>");
profile.NativeProtocolType(VpnNativeProtocolType::L2tp);
profile.ProfileName(L"VPN Connection");
profile.RememberCredentials(true);
profile.RequireVpnClientAppUI(false);
profile.RoutingPolicyType(VpnRoutingPolicyType::ForceAllTrafficOverVpn);
profile.Servers().Append(L"vlus-af1.pointtoserver.com");
profile.RequireVpnClientAppUI(true);
profile.UserAuthenticationMethod(VpnAuthenticationMethod::Certificate);
profile.TunnelAuthenticationMethod(VpnAuthenticationMethod::Certificate);

VpnManagementAgent agent;
wprintf(L"%d\n", agent.AddProfileFromXmlAsync(pVPNXmlCode).get());

wprintf(L"%d\n", agent.AddProfileFromObjectAsync(profile).get());

auto profiles = agent.GetProfilesAsync().get();

wprintf(L"Found %d profiles\n", profiles.Size());
for (auto vp : profiles)
{
    wprintf(L"%d\n",agent.DisconnectProfileAsync(vp).get());
    wprintf(L"Found profile %s\n", vp.ProfileName().c_str());
}

wprintf(L"%d\n", agent.ConnectProfileAsync(profile).get());

wprintf(L"%d\n", agent.UpdateProfileFromXmlAsync(pVPNXmlCode).get());

wprintf(L"never reached\n");

}

Here is how I compile the above:

cl so.cpp /std:c++latest /link RuntimeObject.lib Ole32.lib OleAut32.lib

Here is a C# variant:

using System;
using Windows;
using Windows.Networking.Vpn;
using System.Threading.Tasks;
using Windows.Networking;
using  System.Threading;

public class entry
{public static async Task Main()
{VpnManagementAgent mgr = new VpnManagementAgent();
    mgr.GetProfilesAsync().Completed = (asyncInfo, asyncStatus) => {Console.WriteLine($"{asyncInfo.GetResults().Count}\n");};
    Thread.Sleep(-1);}}

I'm compiling this one with:

csc same.cs /r:"C:\Program Files (x86)\Windows Kits\10\References\10.0.18362.0\Windows.Foundation.UniversalApiContract\8.0.0.0\Windows.Foundation.UniversalApiContract.winmd" /r:System.Runtime.dll /r:"C:\Program Files (x86)\Windows Kits\10\References\10.0.18362.0\Windows.Foundation.FoundationContract\3.0.0.0\Windows.Foundation.FoundationContract.winmd" /langversion:preview

I'm using Visual Studio 2019 Build Tools and I'm running Windows Server 2019.

I'm looking for MSFT answers. How can I leverage any VPN functionality from said interface.

And here is the output of my C program:

0
0
SET0:1
0
SET0:1
0
SET1:1
0
Amount of profiles collected 0
SET0:1
0

1 means VpnManagementErrorStatus_Other . Here is the C++ program output:

1
1
Found 0 profiles
1

Here is the C# variant output:

0

The problem steems from the fact that I haven't manifested my application properly .

I've figured out that with IDA since there was a call to GetCurrentPackageFamilyName followed by other calls in a functions which return value was checked for being signed (ie errorneous) and if it was then no actual action was performed.

Here is my manifestation that has fixed the issue( AppxManifest.xml ):

<?xml version="1.0" encoding="utf-8"?>

<Package
  xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
  xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
  xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
  xmlns:r="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
  xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
  xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" 
  xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
  IgnorableNamespaces="uap mp r uap5 desktop4 iot2">

  <Identity 
    Name="Sasho648.Internal.RmouseVPN.C" 
    Publisher="CN=Sasho648 Corporation, O=Sasho648 Corporation, L=Sofia, C=BG" 
    Version="1.0.0.0" />

  <mp:PhoneIdentity PhoneProductId="a771635b-3275-47f4-bfc9-72642a9b128b" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

  <Properties>
    <DisplayName>MobileBroadband</DisplayName>
    <PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
    <Logo>water-2748640_1920.png</Logo>
  </Properties>

  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10240.0" MaxVersionTested="10.0.18362.0" />
  </Dependencies>

  <Resources>
    <Resource Language="en-us"/>
  </Resources>

  <Applications>
    <Application Id="App"
      Executable="rmousevpn.exe"
      EntryPoint="RmouseVPN.App"
      desktop4:SupportsMultipleInstances="true"
      desktop4:Subsystem="console"
      iot2:Subsystem="console" 
      iot2:SupportsMultipleInstances="true">
<Extensions>  
    <uap5:Extension   
      Category="windows.appExecutionAlias">  
      <uap5:AppExecutionAlias desktop4:Subsystem="console">  
        <uap5:ExecutionAlias Alias="rmousevpn.exe" />  
      </uap5:AppExecutionAlias>  
    </uap5:Extension>  
</Extensions>  
      <uap:VisualElements
        DisplayName="vpnExecutioner"
        Square150x150Logo="water-2748640_1920.png"
        Square44x44Logo="water-2748640_1920.png"
        Description="Execute VPNs connections"

        BackgroundColor="#00b2f0">
      </uap:VisualElements>
    </Application>
  </Applications>

  <Capabilities>
      <r:Capability Name="networkingVpnProvider"/>
  </Capabilities>
</Package>

You then need to enable development mode in security and add the package using PS:

Add-AppxPackage -Path .\Appxmanifest.xml -Register

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM