question

KarthikRaman-7576 avatar image
0 Votes"
KarthikRaman-7576 asked ·

URI in UWP app installer file for local files present

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>

windows-uwp
· 4
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Based on the step 5 of this document, the VS only mentions that the http(s) or UNC path are allowed, so I am consulting the team whether the local file path is also allowed.


0 Votes 0 ·

Hi, does the following method help? Have you solved your issue?

0 Votes 0 ·

It hasn't helped solve issue but I understood relative path is not supported. I can't use absolute path as the absolute path may vary for different users based on where they place the package.

0 Votes 0 ·

Yeap, however, if you want to use the uri of AppInstaller, you can only use the full path to the files.

0 Votes 0 ·

1 Answer

FayWang-MSFT avatar image
0 Votes"
FayWang-MSFT answered ·

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.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.