Forum Discussion
PSF FileRedirectionFixup not working as intended?
Thank you for replying.
I see what is going on. An environment variable is used so the app can figure out where the install directory is.
What you app developers said is correct. An application can't write to the install directory because it is read-only be default. We don't want to mess with that.
I can now understand why PSF was not able to redirect the file operation. I assumed that the application was writing to C:\ProgramfilesX68\... not C:\Program files\WindowsApps\\VFS\ProgramFilesX86\IMPAC\METRIQ. That would require a change in the configuration.
We need to tell PSF to redirect all writes to the pacakge root. I would try changing the config to point to VFS\ProgramFilesX86\IMPAC\METRIQ and see if that works.
Another question. Is it possible for the app developers to change the programs logic? That might be easier than trying to get PSF to work.
Darren_Hoehna thanks for your continued help. When i originally started this I had used the full path for re-direction, and what would happen was the INI file (which is just the first of many files of concern) would be copied out of the package to the redirected location. However, any changes to that file during the application session would be over written the very next time the application started. so rather than having the app read the redirected location, it reads within the package, and changes the copy that is in the writable location. This is not preferable.
Changing the application is not something that is going to happen in the current timeline I'm in.
I have a workaround specifically for the INI file that I'm going to look into, but it's only viable if I can have all new folder and file creation that would happen in the application directory happen in the writable redirected location. it's probably more of a phone conversation to discuss this, not sure if you would be open to that.
Thanks again for the help Darren.
- John WildesAug 15, 2020Brass Contributor
Darren_HoehnaThank you! Monday is fine.
- Darren_HoehnaAug 14, 2020
Microsoft
You are very welcome. I try to help where I can.
PSF's FRF handles redirection for the creation of directories. If you have a clean slate PSF can redirect the Create Directory calls.
I didn't think re-writing the application would work, but it was worth an ask.
I think a phone call would be great. Before we go further with that action I would like to talk to my boss first. He is out today but will be in the office tomorrow. Is it okay if I get back to you on Monday with a time?