| 109 | } |
| 110 | |
| 111 | HRESULT CUpdateRunner::ShellExecuteFromExplorer(LPWSTR pszFile, LPWSTR pszParameters) |
| 112 | { |
| 113 | HRESULT hr; |
| 114 | |
| 115 | CComPtr<IShellFolderViewDual> spFolderView; |
| 116 | hr = GetDesktopAutomationObject(IID_PPV_ARGS(&spFolderView)); |
| 117 | if (FAILED(hr)) return hr; |
| 118 | |
| 119 | CComPtr<IDispatch> spdispShell; |
| 120 | hr = spFolderView->get_Application(&spdispShell); |
| 121 | if (FAILED(hr)) return hr; |
| 122 | |
| 123 | return CComQIPtr<IShellDispatch2>(spdispShell)->ShellExecute( |
| 124 | CComBSTR(pszFile), |
| 125 | CComVariant(pszParameters ? pszParameters : L""), |
| 126 | CComVariant(L""), |
| 127 | CComVariant(L""), |
| 128 | CComVariant(SW_SHOWDEFAULT)); |
| 129 | } |
| 130 | |
| 131 | bool CUpdateRunner::DirectoryExists(wchar_t* szPath) |
| 132 | { |
nothing calls this directly
no test coverage detected