mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[SHELL32][STOBJECT] Enforce ShellExecuteW(..., file, parameters, ...)
CORE-16299
This commit is contained in:
parent
343442cc3f
commit
cb77f1701f
4 changed files with 42 additions and 8 deletions
|
@ -155,7 +155,12 @@ HRESULT STDMETHODCALLTYPE Hotplug_Shutdown(_In_ CSysTray * pSysTray)
|
||||||
|
|
||||||
static void _RunHotplug(CSysTray * pSysTray)
|
static void _RunHotplug(CSysTray * pSysTray)
|
||||||
{
|
{
|
||||||
ShellExecuteW(pSysTray->GetHWnd(), L"open", L"rundll32.exe shell32.dll,Control_RunDLL hotplug.dll", NULL, NULL, SW_SHOWNORMAL);
|
ShellExecuteW(pSysTray->GetHWnd(),
|
||||||
|
L"open",
|
||||||
|
L"rundll32.exe",
|
||||||
|
L"shell32.dll,Control_RunDLL hotplug.dll",
|
||||||
|
NULL,
|
||||||
|
SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _ShowContextMenu(CSysTray * pSysTray)
|
static void _ShowContextMenu(CSysTray * pSysTray)
|
||||||
|
|
|
@ -211,7 +211,12 @@ HRESULT Volume_OnDeviceChange(_In_ CSysTray * pSysTray, WPARAM wParam, LPARAM lP
|
||||||
|
|
||||||
static void _RunVolume(BOOL bTray)
|
static void _RunVolume(BOOL bTray)
|
||||||
{
|
{
|
||||||
ShellExecuteW(NULL, NULL, bTray ? L"sndvol32.exe /t" : L"sndvol32.exe", NULL, NULL, SW_SHOWNORMAL);
|
ShellExecuteW(NULL,
|
||||||
|
NULL,
|
||||||
|
L"sndvol32.exe",
|
||||||
|
bTray ? L"/t" : NULL,
|
||||||
|
NULL,
|
||||||
|
SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _RunMMCpl()
|
static void _RunMMCpl()
|
||||||
|
|
|
@ -1087,7 +1087,12 @@ HRESULT WINAPI CDrivesFolder::CallBack(IShellFolder *psf, HWND hwndOwner, IDataO
|
||||||
if (uMsg == DFM_INVOKECOMMAND && wParam == 1) // #1
|
if (uMsg == DFM_INVOKECOMMAND && wParam == 1) // #1
|
||||||
{
|
{
|
||||||
// "System" properties
|
// "System" properties
|
||||||
ShellExecuteW(hwndOwner, NULL, L"rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl", NULL, NULL, SW_SHOWNORMAL);
|
ShellExecuteW(hwndOwner,
|
||||||
|
NULL,
|
||||||
|
L"rundll32.exe",
|
||||||
|
L"shell32.dll,Control_RunDLL sysdm.cpl",
|
||||||
|
NULL,
|
||||||
|
SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
else if (uMsg == DFM_MERGECONTEXTMENU)
|
else if (uMsg == DFM_MERGECONTEXTMENU)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,21 +41,40 @@ HRESULT CALLBACK RegFolderContextMenuCallback(IShellFolder *psf,
|
||||||
|
|
||||||
if (_ILIsMyComputer(apidl[0]))
|
if (_ILIsMyComputer(apidl[0]))
|
||||||
{
|
{
|
||||||
if (32 >= (UINT_PTR)ShellExecuteW(hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl", NULL, NULL, SW_SHOWNORMAL))
|
if (32 >= (UINT_PTR)ShellExecuteW(hwnd,
|
||||||
|
L"open",
|
||||||
|
L"rundll32.exe",
|
||||||
|
L"shell32.dll,Control_RunDLL sysdm.cpl",
|
||||||
|
NULL,
|
||||||
|
SW_SHOWNORMAL))
|
||||||
|
{
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (_ILIsDesktop(apidl[0]))
|
else if (_ILIsDesktop(apidl[0]))
|
||||||
{
|
{
|
||||||
if (32 >= (UINT_PTR)ShellExecuteW(hwnd, L"open", L"rundll32.exe shell32.dll,Control_RunDLL desk.cpl", NULL, NULL, SW_SHOWNORMAL))
|
if (32 >= (UINT_PTR)ShellExecuteW(hwnd,
|
||||||
|
L"open",
|
||||||
|
L"rundll32.exe",
|
||||||
|
L"shell32.dll,Control_RunDLL desk.cpl",
|
||||||
|
NULL,
|
||||||
|
SW_SHOWNORMAL))
|
||||||
|
{
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (_ILIsNetHood(apidl[0]))
|
else if (_ILIsNetHood(apidl[0]))
|
||||||
{
|
{
|
||||||
// FIXME path!
|
// FIXME path!
|
||||||
if (32 >= (UINT_PTR)ShellExecuteW(NULL, L"open", L"explorer.exe",
|
if (32 >= (UINT_PTR)ShellExecuteW(NULL,
|
||||||
L"::{7007ACC7-3202-11D1-AAD2-00805FC1270E}",
|
L"open",
|
||||||
NULL, SW_SHOWDEFAULT))
|
L"explorer.exe",
|
||||||
|
L"::{7007ACC7-3202-11D1-AAD2-00805FC1270E}",
|
||||||
|
NULL,
|
||||||
|
SW_SHOWDEFAULT))
|
||||||
|
{
|
||||||
hr = E_FAIL;
|
hr = E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (_ILIsBitBucket(apidl[0]))
|
else if (_ILIsBitBucket(apidl[0]))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue