How to handle MSIX application shortcut Arguments using MSPT + PSF Files

Copper Contributor

Hi,

 

I’m  working on MSIX application shortcut Arguments for Mozilla Firefox to build some understanding on the process of how it works. I’m facing the issue as in below.

 

Note: I have tested the same using Advanced Installer and PSFTooling it works as expected, but when i’m trying to do same with PSF files i’m having issue.

 

Steps Performed

 

  1. In MSPT Monitoring phase installed the firefox application via VFS 
  2. Not launched the shortcuts
  3. Copied the 32 bit (PSFLauncher32, psfruntime32,psfrundll32) files downloaded from https://github.com/microsoft/MSIX-Labs/tree/master/MSIXLab/Tools and copied in “C:\ProgramFilesX86\Mozilla Firefox”
  4. Renamed PSFLauncher32 to PSFLauncher1
  5. Modified the Shortcut Target to "C:\Program Files (x86)\Mozilla Firefox\PsfLauncher1.exe"
  6. Created a Json file referenced from PSFTooling and copied in “C:\ProgramFilesX86\Mozilla Firefox”

{

  "enableReportError": true,

  "applications": [

    {

      "id": "PSFLAUNCHEROne",

      "executable": "VFS\\ProgramFilesX86\\Mozilla Firefox\\firefox.exe",

      "arguments": "-devtools",

      "workingDirectory": "VFS\\ProgramFilesX86\\Mozilla Firefox",

      "stopOnScriptError": false

    }

  ],

  "processes": []

}

  1. Here is my Application manifest file details

<!--Package created by MSIX Packaging Tool version: 1.2019.1220.0-->



<Identity ProcessorArchitecture="x64" Version="1.0.0.0" Publisher="CN=Contoso Software (FOR LAB USE ONLY), O=Contoso Corporation, C=US" Name="Firefox-MSPT-PSF-X86"/>



-<Properties>

 

<DisplayName>Firefox-MSPT-PSF-X86</DisplayName>

 

<PublisherDisplayName>MS</PublisherDisplayName>

 

<Description>Firefox-MSPT-PSF-X86</Description>

 

<Logo>Assets\StoreLogo.png</Logo>

 

</Properties>



-<Resources>

 

<Resource Language="en-us"/>

 

</Resources>



-<Dependencies>

 

<TargetDeviceFamily Name="Windows.Desktop" MaxVersionTested="10.0.18335.0" MinVersion="10.0.17763.0"/>

 

</Dependencies>



-<Capabilities>

 

<rescap:Capability Name="runFullTrust"/>

 

</Capabilities>



-<Applications>



-<Application EntryPoint="Windows.FullTrustApplication" Executable="VFS\ProgramFilesX86\Mozilla Firefox\PsfLauncher1.exe" Id="PSFLAUNCHEROne">



-<uap:VisualElements Description="Firefox" Square44x44Logo="Assets\Square44x44Logo.png" Square150x150Logo="Assets\Square150x150Logo.png" DisplayName="Firefox" BackgroundColor="transparent">

 

<uap:DefaultTile Square71x71Logo="Assets\Square71x71Logo.png" Square310x310Logo="Assets\Square310x310Logo.png" Wide310x150Logo="Assets\Wide310x150Logo.png"/>

 

</uap:VisualElements>

 

</Application>

 

</Applications>

 

</Package>





Upon testing the package i get below error

 

KumarOne_0-1586237358371.png

 

 

I’m struggling hard to overcome this issue but no luck, Any Assistance/Guidance/direction will be much appreciated

13 Replies

Hi @KumarOne., can you verify that the config.json is in the same folder as PSFLauncher.exe? 

Hi @Dian Hartono,

 

Both are in same in same location , could you please step no 3 & 6

Hi @KumarOne

 

It would be great if you can provide us with the package so we can take a look.  

 

-Dian 

@Dian Hartono

 

Share the package as requested, could you please have a look and advise 

Hi @KumarOne

 

We did a bit of digging. Typically, config and PSF binaries need to be in the root on the app.  If you take PSFRundll, PsfLauncher, Config.json, and PsfRuntime and put them in the root of the app Firefox will launch. 

Also, 

  • StopOnScriptError is not needed since there are no scripts being ran.
  • WorkingDIrectory is for the working directory of the executable, not PSF.

-Dian

@Dian Hartono 

 

I have tried that as well but no luck, have you tested ? has it worked for you ?, if so can you please share the JSON Entries & App Manifest details. 

KumarOne_0-1586621042148.png

 

Hey, @KumarOne 

 

The error you have posted says that the configuration file can't be parsed.  Turns out that the configuration file can be found now, good job on fixing the initial error.

 

The configuration file you posted in your opening message is correct and PSF should be able to parse it.

 

Can you please post your config.json file here so I can look at it?

@Darren_Hoehna 

 

Hi, i have already uploaded the files and msix package as well. I hope you should be able to fetch out the details from MSIX Package. As per the suggestions from @Dian Hartono  i have modified the config and xml as in below.

 

KumarOne_0-1586837946262.png

 

 

@Dian Hartono  I'll just note here that support in the PSF to handle the PSF components not being at the root folder was added into GitHub some time back. Whether that is in the current nuget package version I'm not sure.

@KumarOne  While this is probably not your issue, please rule this out. Make sure that you used a copy of the 32-bit version of PsfLauncher. The bitness of the Psf launcher and dlls should always match that of the target application.

Hey @KumarOne 

 

@TIMOTHY MANGAN might be right.  The other PSF binaries do need to be 32 bit if your main executable is 32 bit.

 

I have uploaded Firefox with the configuration manifest changes.  Can you please try this package and report back?

 

If the application still does not work we'll need to diagnose why it isn't working on your machine.

@KumarOne 

 

I forgot to attach the MSIX.