Skip to content

Commit bdaec76

Browse files
committed
Setup: Remove warning about very old ClassicShell version
Latest version of ClassicShell was 4.3.1. There is no reason to display any warning about very old versions (< 2.0.0). Besides, this will remove dependency on version.dll which could be misused for DLL hijacking attack. Fixes #72
1 parent 16de25a commit bdaec76

File tree

3 files changed

+0
-46
lines changed

3 files changed

+0
-46
lines changed

Src/Setup/Setup.cpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// It unpacks the right installer into the temp directory and executes it.
1717

1818
typedef BOOL (WINAPI *FIsWow64Process)( HANDLE hProcess, PBOOL Wow64Process );
19-
typedef BOOL (WINAPI *FQueryFullProcessImageName)( HANDLE hProcess, DWORD dwFlags, LPTSTR lpExeName, PDWORD lpdwSize );
2019

2120

2221

@@ -326,49 +325,6 @@ int APIENTRY wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCm
326325
BOOL b64=FALSE;
327326
isWow64Process(GetCurrentProcess(),&b64);
328327

329-
// look for an old version of the classic start menu (2.0.0 or older) and show a warning if it is still running. the uninstaller for such old versions doesn't close the start menu
330-
HWND hwnd=FindWindow(L"ClassicStartMenu.CStartHookWindow",L"StartHookWindow");
331-
if (hwnd)
332-
{
333-
bool bStartMenu=false;
334-
335-
DWORD id;
336-
GetWindowThreadProcessId(hwnd,&id);
337-
HANDLE process=OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ,FALSE,id);
338-
if (process)
339-
{
340-
bStartMenu=true;
341-
wchar_t path[_MAX_PATH];
342-
DWORD size=_countof(path);
343-
344-
FQueryFullProcessImageName queryFullProcessImageName=(FQueryFullProcessImageName)GetProcAddress(hKernel32,"QueryFullProcessImageNameW");
345-
if (queryFullProcessImageName && queryFullProcessImageName(process,0,path,&size))
346-
{
347-
DWORD q;
348-
DWORD size=GetFileVersionInfoSize(path,&q);
349-
if (size)
350-
{
351-
std::vector<char> buf(size);
352-
if (GetFileVersionInfo(path,0,size,&buf[0]))
353-
{
354-
VS_FIXEDFILEINFO *pVer;
355-
UINT len;
356-
if (VerQueryValue(&buf[0],L"\\",(void**)&pVer,&len) && pVer->dwProductVersionMS>0x20000)
357-
bStartMenu=false;
358-
}
359-
}
360-
}
361-
CloseHandle(process);
362-
}
363-
if (bStartMenu)
364-
{
365-
wchar_t strTitle[256];
366-
if (!LoadString(hInstance,IDS_APP_TITLE,strTitle,_countof(strTitle))) strTitle[0]=0;
367-
wchar_t strText[1024];
368-
if (!LoadString(hInstance,IDS_OLDSTARTMENU,strText,_countof(strText))) strText[0]=0;
369-
MessageBox(NULL,strText,strTitle,MB_OK|MB_ICONWARNING);
370-
}
371-
}
372328
/*
373329
// warning about being beta
374330
if (!bQuiet)

Src/Setup/Setup.rc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ END
148148
STRINGTABLE
149149
BEGIN
150150
IDS_APP_TITLE "Open-Shell Setup"
151-
IDS_OLDSTARTMENU "Warning!\nAn old version of the classic start menu is still running. Please close it before installing the new version to avoid crashing Explorer. Right click on the start button and select ""Exit""."
152151
IDS_ERR_CORRUPTED "Failed to extract setup file '%s'. The MSI resource is corrupted."
153152
END
154153

Src/Setup/resource.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#define IDS_APP_NAME 100
66
#define IDS_APP_TITLE 100
77
#define IDI_APPICON 101
8-
#define IDS_OLDSTARTMENU 101
98
#define IDS_ERR_CORRUPTED 102
109
#define IDR_MSI_FILE32 132
1110
#define IDR_MSI_FILE64 164

0 commit comments

Comments
 (0)