forked from TimMangan/MSIX-PackageSupportFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes.txt
More file actions
176 lines (150 loc) · 13.1 KB
/
Notes.txt
File metadata and controls
176 lines (150 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
ideas:
* Consider hidden/system file marker in redirection for deletion, similar to what ILV does.
* Check out CreateFile on C:\CONOUT$ in Calibre. Returns with invalid handle? MFR.
* Psf is unaware of SPC. This means that FRF/MFR determine redirection area on package level of
the launched app rather than container folder for redirection. Not breaking anything currently, but ugh!
* SPC seems to immedietly fail PsfLauncher if Ilv is set in package.
* Psf FRF/MFR make assumptions that it can use the package path if the file looks like it is in the package path
using PathExits. FindFile works also. GetFileAttributes and CreateFile, however, need the call to use the native path.
This might be a bug, and we might be able to work around it for the folders that map like Program Files, but not
for non-mapped native folders. Addressed through use of MFR+ILV for now.
* MFR+ILV: The delete using native path test deletes the file, but then checking the attribute using that native path doesn't return with invalid attributes.
This indicates that the check for the deletion marker only is in place when the package path is requested. There appears no way to determine this
situation from one where the native file exists and it was never in the package. A possibility would be to add an additional marker in Delete file(etc) such
as an extra xxx.yyy.deleted file in the redirection area. But then all methods looking to see files would have to look for this, and anything creating a file might have to remove it.
Needs more thought on finding a way to distinguish.
* EnvVar: If the value is a string including Registry file pathing {[ProgramFilexX64]} we might need to Reg->VFS path it? Seems like we'd need to and a quick look at the code suggests that we don't.
v.Next
* PsfLauncher/PsfFtaCom: Support for new pseudo-variable in command and script files and arguments, %MsixPackageFamilyName%
* PsfLauncher/PsfFtaCom: Added support for terminating the child processes of the launched executable when the launhed executable exits. This is a new application setting in the Json which is a boolean called 'terminateChildren'.
When not present, it defaults to false.
v.2025.05.11
* PsfLauncher: Fix to support shortcuts to files that don't have an default FTA at the client. The launcher will now launch "openwith.exe" to let the user pick an app outside this container.
* MfrFixup: Fixes to file mappings. One involving directories, the other when ILV is involved for file listings such as dialogs.
* Logging: Continuation to improvements to the debug logging system. Entries are now flagged with the module issuing the event to aid in interpeting long capatures.
v.2025.04.26
* MfrFixup: Removal of logging only intercepts
* Fix for PsfFtaCom: Ensure command line arguments for shell intration verb command remain quoted if they were previously quoted.
* Fixes in MfrFixup for performing exact folder matches for possible redirections.
* Don't replace / with \ in filepaths starting with /dev/
v.2025.04.12
* Detours: Changes to enable intercepts of new patterns
* MfrFixup: Changes to ShellExecute, ShellExecuteEx for debugging in release mode
* MfrFixup: Changes to NtCreateFile and NtOpenFile for debugging in release mode
* MfrFixup: ShortName improvements
* MfrFixup/FileRedirectionFixup: Another needed change for case insensitive file matching
* General: Debugging improvements in debug mode
v.2025.02.22:
* MFRFixup: Fix for mapping of virtual directories edge case. Also improved handling of file requests to C:\ to stay with the native path.
* MFRFixup: Fixes to improve results when app "walks through" the user profile directory to get to either of the appdatas. Similarly for the Windows folder and renamapped children, and for System32 and it's remapped children
* FRF/MFR: Added support for "SystemApps", an undocumented virtual folder created by the MMPT.
* MFR: Added support to turn Appdata\Microsoft\Windows\Recent into a redirect to local folder (redirect to local not implemented in the FRF). This fixes certain win32 app dialog boxes for file/directory picking when first opened.
* Added support for fixups in NtQueryDirectoryFile and NtQueryDirectoryFileEx where windows.storage.dll was bypassing kernel32.
* Added registry marker to processes after PSF has finished initializing all fixup dlls in the process. It will try to open a non-existent key HKCU\PSF_READY_MARKER that you can see in Process Monitor.
* Added debugging output when an app gets access denied to create a registry key. Not important.
* Added missing versioning to the 64 bit components.
* Solved issue with Debug build "2_Ctr_new_delete:" issue.
* MFRFixup and FileRedirectionFixup: Cleanup on FindClose() leading to app crash in odd situations and possible memory leak.
* MFRFixup: Proper handling of older Shell API (for old file picker dialogs) calls that walk up the directory tree. This includes properly handling the undocumented
UserProfiles and Profile VFS variables, but also the actual AppData folder.
* MfrFixup: Reduction in calls to the same path.
v.2025.01.02:
* Improvements in DynamicLibraryFixup for situations where ILV seems to interfere with the fixup.
* Changes for debug output on RegOpenKeyEx and RegQueryValueEx.
v.2024.10.26:
* Added new option for PsfLaucher and PsfFtaCom to prevent MultipleInstances to prevent multiple instances of the same application from running in the user session.
* Return of support for RunInVirtualEnvironment for scripts. Default remains true.
* Fix for different powershell versions when used in PsfLauncher.
* Added a date oriented versioning to Psf build components except PsfLauncher.
v.2024.09.05:
* RegLegacyFixup: (Issue #247). Allow Json entries for HKLM/HKCU hive types to have alternative case. Yeah, it isn't normally done for Json and we are NOT going to make all of the json entries case insisitive, but this seems OK.
* PsfRuntime: (ISSUE #200) Detect and issue error message when a config.Json file is not found in the package .
* MfrFixup: (PR #28) Fallback to machine codepage when unicode fails.
v.2024.08.05:
* Prevent crash due to downrev Windows.storage.dll Detouring.
* Added new launcher component, PsfFtaCom to handle FTA, Shell Extension, and Application COM components.
* Fix for PsfLauncher with argument virtualization.
v.2024.03.04:
* MFR: Add support for SetCurrentDirectory ILV-Aware mode to force path to be a
package path when appropriate. When an app uses a file-picker dialog (which currently bypasses MFR), it might cause the app
to request a file in the \\?\\UNC\server\share\path format. We now convert this to the normal form of \\server\share\path
before processing the request.
* RegLegacy: Don't let staterepository requests get into the container registry.
v.2024.02.04:
* RegLegacy: Moved certain intercepts from the Kernel32.dll to KernelBase.dll. This is because some apps bypass the Kernel32.dll and go directly to KernelBase.dll.
An example of this is any application that uses the Microsoft Winsoc2 library, which results in an access denied error when accessing HKCU.
These intercepts are functional.
* MfrFixup: Added a number of new intercepts in Ntdll.dll. A number of microsoft libraries bypass the Kernel32.dll and go directly to Ntdll.dll.
An example of this include any application that is WinForms or .Net Framework and has a "file picker" dialog based out of the Microsoft User32 library.
These intercepts are not yet functional, but will produce logging (even in release builds) to the console port (DebugView) if triggered by a call that was
not handled at a higher level API. This will help us to identify which calls are being made and which ones we need to handle in the future.
* Mfr/FRF: Added detection and handling of filepaths using the Windows Storage Namespace syntax of \\?\\STORAGE#.
v.2024.0102:
* Added Deletion_Marker to RegLegacyFixup to match the Microsoft implementation.
* Added Java_Blocker to RegLegacyFixup as a simpler registry blocker specically for Java.
* Removed inheritHandles from StartProcess calls for the PsfLauncher start of the primary application.
v.2023.0828
* PsfRuntime: Cross architecture issues for injection of PsfRuntime. Modification to allow RunDll32.exe and RunDll64.exe to be located anywhere in the package.
Foxta has an x64 process trying to launch a 32-bit process. So RunDll32.exe must be used. The code in CreateProcessHook, CreateProcessWithPsfRunDll,
has an explicit assumption that RunDll32 will be located at the root of the package. It should search for the file similar to how we handle the dlls.
Should we be checking the bitness of the two processes before trying to inject, skip the direct inject and call the appropriate RunDllXX.exe?
v.2023.08013
* More standard level debugging (_Debug) on RegLegacyFixup for calls to Delete things.
* PsfRuntime: Fix to call to SetDllDirectory with null path (to restore order), added SetDefaultDllDirectories for debugging too.
* MfrFixup: ShellExecute was being recursive and crashing.
v.2023.07.03
* Fix to RegLegacy that caused ony first rule to be tested.
* Fix for MFR in IlvMode when package files have been deleted.
v.2023.06.05
* PsfRuntime: Fix issue with mixed bit processes and injection of PsfRuntime into new process when the Psf components are not located in the
root folder of the package (i.e. PsfTooling was used).
v.2023.02.05
* MFR: Add UserProgramFiles to the VFS Traditional mappings.
* MFR: Fix IsCreateForChange to consider FILE_ALL_ACCESS before BACKUP_SEMANTICS.
* MFR: Potential fix for CreateFile,CreateFile2 only - and only on redir case, to try package directly. (Spyder).
* Launcher: Add UserProgramFiles to ArgumentVirtualization List
* MFR: Add intercept to kerbase.dll version of MoveFileExW as the kernel32.dll version may be bypassed (Audacity).
* PsfRuntime: Add intercept to CreateProcessAsUserA/W.
* MFR: Avoid dll initialization crash when multiple processes are injecting at the same time.
* MFR: Don't redirect C:\Program Files\WindowsApps
* MFR: Add pipe support.
* DynDll: Handle dll loading using '/' for path separations.
v.2022.12.11
* MFR: Add an ILV-Aware mode for MFR. Could simplify some things.
* MFR: Add support for SetCurrentDirectory ILV-Aware mode to force path to be a
package path when appropriate. When an app uses this API to change the current directory,
this will map the request to use the equivalent package path if that folder exists in the package.
* RegLeg: Add _Debug Preprocessor to debug builds.
* RegLeg: Adjust Full2MaxAllowed to a better fixup than MAXIMUM_ALLOWED so that
* apps can create subkeys.
* RegLeg: Update documentation to clarify dependencies on release build also.
* Debug Builds: Turned off the second level of debugging (MOREDEBUG) in debug builds. That
extra level of debugging is only needed for debugging the PSF itself, not for
debugging app issues that IT Pros can use.
v.2022.12.05
* Created new Managed File Redirection Fixup (MFRFixup) as a potential replacement for FileRedirectionFixup
* Fix issue in DynamicLibraryFixup with certain mixes of bitness.
* Fixup a mistake commonly made for the exe and working directory of the application record in the config.json; "\\VFS\\..." means they really wanted "VFS\\..."
* Support by ignoring the shell file references in FRF/MFR, i.e. shell::{guid} or just ::{guid} used in older file picker dialogs.
* Support by ignoring for the old-style DOS special objects in FRF/MFR, e.g COM4: or LPT2: or CONOUT$
* Alter attempts to open a native directory to list files to open the native directory. Not an ideal solution, but better than going to the redirection area.
* Add intercepts of ShellExecute and ShellExecuteEx for debugging purposes without changes.
* Fix argument virtualization for 32-bit launcher.
* [Post 11.10] Fix MFR overrides.
* MFR: Treat .exe.Config as a COW even if it isn't. (mRemoteNG/Winforms issue). Then removed.
v.2022.08.05
* Incorporate platform changes per Microsoft
* PathRedirectonV2 fix for DeVFS calculation.
* Renumber debug instance startin numbers. FRF=0, DynLib=30k Env=40k RegLeg=50k
* Allow Copy and Rename fixups to handle empty redirected destinations and sources only in redirected area.
v.2022.07.10
* Fix DynamicLibraryFixup to allow for mixed cases in call by app.
* Fix for CreateFile when request is to the redirected area directly and file either exists already there or the request was to CREATE_ALWAYS.
* Fix DeleteDirectory to allow deletion of redirected directory (even though the package folder will still be present).
* WIP: Add intercepts for many ucrtbased (POSIX) file system calls.
The code is currenly defined out, and would only intercept, and log (debug build only), and call the original function if enabled.
This was an attempt to determine if some of these functions skip the kernel32 library and jump under our intercepts there.
Ultimately conditionally compiled these out as they A) Didn't intercept for some reason. B) Were determined to not be needed.
* Added intercept for ReadDirectoryChangesW and ReadDirectoryChangesExW that only log the calls.
Until we find an app that requires modification, this is the next best thing.
v.2022.06.08