开发者

How to prevent SxS error when launching the application from virtual path?

I am currently working on a simple application virtualization layer by virtualizing all file/registry operations at the NtDll.dll level.

But when I launch the application from 开发者_JAVA百科the virtual path, and if the virtual path doesnt exist in the actual Host, then the application fails to launch.

Here is the example

If the virtual filesystem's base path is H:\VirtualFS and H:\VirtualFS\c\folder\file.exe maps to the c:\folder\file.exe. If I launch this exe from my virtualization layer, and if the Host OS contains the folder c:\folder, then I am able to launch the file.exe properly. If the Host OS doesnt have the folder c:\folder, then the application launch fails because of the SxS error and here is the error

     Generate Activation Context failed for c:\folder\file.exe. Reference error message: The operation completed successfully.

I even tried to override the RTCreateProcessParameters function to map the virtual path to real path, but still the same error persists.

Any help/guidance will be really helpful. Thanks.


Hooking ntdll.dll is of course not supported, but the reason you're hitting errors is because the path isn't being read from the process context. Instead, activation contexts are generated from manifests by delegating to an external service, which probably won't hit your virtualization layer. May I suggest you look at filesystem filters instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜