I am writing a Windows Explorer Preview Handler in ATL (no MFC). Its works fine except for the following problems which I believe are related to insufficient privileges:
- A CDialogImpl based dialog (Resource based) does not show up after a call to DoModal().
- ShellExecute(... "http://www.someurl.com) does not open the default browser.
- My Logger::Log() method executes but I do not see anything written to log files.
GetLastError() after DoModal() call returns 5 (ACCESS_DENIED) but I am not sure for what. The call to DoModal() is made from a context-menu handler.
ShellExecute when called displays a "Google Chrome is unresponsive, Relaunch Now?" dialog. Clicking YES will close Chrome but will never launch it, clicking NO does nothing. Same for ShellExecuteEx.
ShellExecute(NULL, _T("open"), _T("http://www.google.com"), NULL, NULL, SW_SHOWNORMAL)
It seems that the problem is related to insufficient privileges to preview handler running inside PREVHOST.EXE. File log is written fine in my Thumbnail Handler but not in this Preview Handler. Are there any limitations to what can be done when running under PREVHOST.EXE? Any Ideas?
Thanks in Advance.
In case if some-one else trapped on this. By default prevhost.exe is running in Low Integrity mode
Here you can check the list of limitations
In short words you are very limited in places where you can write:
HKEY_CURRENT_USER\Software\AppDataLow
%USER PROFILE%\AppData\LocalLow
Also there are limitations on available ways of IPC.