URI in UWP app installer file for local files present

Karthik Raman 31 Reputation points
2020-04-14T16:52:07.237+00:00

I want to write an appinstaller file for my UWP application so that dependencies are also automatically installed. For some reason, the client doesn't want the app to be in the internet and would like the app to be distributed via a company pen drive(remote work location: no network)

How to mention uri for a relative path for local files present. The examples I see are web URIs. I tried using Uri="file:///installer.appinstaller"

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
xmlns="http://schemas.microsoft.com/appx/appinstaller/2017/2"
Version="0.0.7.0"
Uri="file:///installer.appinstaller" >

<MainPackage
    Name="...."
    Publisher="CN=zzz, O=zzz Ltd., C=FL"
    Version="1.0.7.0"
    ProcessorArchitecture="x86"
    Uri="file:///App_1.0.7.0_x86_Debug.appx"/>

<Dependencies>
<Package Name="Microsoft.NET.CoreFramework.Debug.2.2" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="2.2.27909.0" ProcessorArchitecture="x86" Uri="file:///Dependencies/x86/Microsoft.NET.CoreFramework.Debug.2.2.appx"/>    

</Dependencies>
</AppInstaller>

Universal Windows Platform (UWP)
1 vote

Accepted answer
  1. Fay Wang - MSFT 5,121 Reputation points
    2020-04-17T08:04:11.227+00:00

    Hello,

    ​Welcome to our Microsoft Q&A platform!

    Based on the reply I've got from the team, we can install using a local path. Although the files can be local on a machine, the path specified can't be a relative path, it needs to be a full path to the files. For example:

    <AppInstaller
      ......
      Uri="C:\xxx\Desktop\MSIX\AppInstaller\xxx.appinstaller">
    
      <MainPackage
        ......
        Uri="C:\xxx\xxx.msix" />
    </AppInstaller>
    

    Both the AppInstaller file and main package Uri are local paths on the C drive.

    No comments

0 additional answers

Sort by: Most helpful