1

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> 
karthik vr
  • 55
  • 5

2 Answers2

2

According to the response I got, the files can be local on a machine but the path specified can't be a relative path it, needs to be a full path to the files.

Roy Li - MSFT
  • 8,043
  • 1
  • 7
  • 13
1

appinstaller is just a file that is meant to be used for downloading actual resources (package) from web (https://learn.microsoft.com/en-us/windows/msix/app-installer/web-install-azure).

I think in your scenario distributing just .msix package should be sufficient. .msix file contains all you need to install and run the app.

There is also "issue" with certificate. Maybe running install powershell script could be an option

Alamakanambra
  • 5,845
  • 3
  • 36
  • 43
  • Power shell works but doesn't look good for end user. appx package doesn't seen to automatically install the dependencies – karthik vr Apr 15 '20 at 07:38
  • 1
    You also need the dependencies folder. When you publish your UWP app from visual studio it will create `AppPackages` folder in your project folder. There is everything you need. So, distributing this should do the work? – Alamakanambra Apr 15 '20 at 17:05
  • Dependencies folder is created in AppPackages. But they don't get auto installed when I run the appx installer. User has to go to the dependencies folder and install them too. – karthik vr Apr 17 '20 at 09:12
  • and if you don't use .appintaller you will not be able to get updates if user can internet back on. – IronHide Feb 15 '23 at 13:58