Forum Discussion

Tim Mangan's avatar
Mar 24, 2019

GetShortPathName

NOTE: This might not be a PSF issue but one that needs to be solved elsewhere in the system?

 

Repackaged Blender 2.7.6 x64 using the MPT and the PSF for File Redirection so that the app can see its config file.  The app fails before getting to that point and running a ProcessMonitor trace I think I see the problem.

 

At one point the app seems to be calling GetShortPathNameW against "C:\Program Files\WindowsApps\[{PackageName}]\2.76\datafiles\…".  The issue is that the WindowsApps (which is 9 characters long) has NO shortname.  So somehow the app then tries to open "C:\Progra~1\Window~1\…" which is actually a different folder!

 

Screen shot attached. #1 is the call through GetShortPathNameW, #2 is the failed call using the return information from GetShortPathW..

 

 

4 Replies

  • Tim ManganHi Tim,

    I saw this kind of issues as well. Some applications might work with a workaround. Try this:

    invoke a process inside the Namespace Invoke-CommandInDesktopPackage

     

    Sample for FreeCommander
    Invoke-CommandInDesktopPackage -PackageFamilyName FreeCommanderXE-32_dcsc6zw6cdwca -AppId "FREECOMMANDER" -Command cmd.exe

     

    Inside try to execute the app from within the native path i.e.:

    C:\program files (x86)\...

    or the 8.3 path

    C:\progra~1\..

    This helps quite often and can be solved with a standard wrapper - or psf in the future.

    I'll try Blender myself later the week.

     

    Enjoy

    /Johannes

Resources