diff --git a/Src/Setup/Setup.cpp b/Src/Setup/Setup.cpp index 43e762c..d3471af 100644 --- a/Src/Setup/Setup.cpp +++ b/Src/Setup/Setup.cpp @@ -198,32 +198,8 @@ static int ExtractMsi( HINSTANCE hInstance, const wchar_t *msiName, bool b64, bo return 0; } -INT_PTR CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) -{ - if (uMsg==WM_COMMAND && wParam==IDOK) - { - wchar_t text[256]; - GetDlgItemText(hwndDlg,IDC_EDITPWD,text,_countof(text)); - CharUpper(text); - if (CalcFNVHash(text)==0xdd7faf06) - EndDialog(hwndDlg,IDOK); - else - MessageBox(hwndDlg,L"Wrong password.",L"Error",MB_OK|MB_ICONERROR); - return TRUE; - } - if (uMsg==WM_COMMAND && wParam==IDCANCEL) - { - EndDialog(hwndDlg,IDCANCEL); - return TRUE; - } - return FALSE; -} - int APIENTRY wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow ) { - INITCOMMONCONTROLSEX init={sizeof(init),ICC_STANDARD_CLASSES}; - InitCommonControlsEx(&init); - // get installer version VS_FIXEDFILEINFO *pVer=NULL; { @@ -238,9 +214,6 @@ int APIENTRY wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCm pVer=(VS_FIXEDFILEINFO*)((char*)pRes+40); } - if (pVer && pVer->dwProductVersionMS==0x20008 && pVer->dwProductVersionLS==0 && DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOGPWD),NULL,DialogProc)!=IDOK) - return 0; - int count; wchar_t *const *params=CommandLineToArgvW(lpCmdLine,&count); if (!params) count=0; @@ -325,27 +298,6 @@ int APIENTRY wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCm BOOL b64=FALSE; isWow64Process(GetCurrentProcess(),&b64); -/* - // warning about being beta - if (!bQuiet) - { - if (MessageBox(NULL,L"Warning!\nThis is a beta version of Open-Shell. It contains features that are not fully tested. Please report any problems in the Open-Shell forums. If you prefer a stable build over the latest features, you can download one of the \"general release\" versions like 3.6.8.\nDo you want to continue with the installation?",L"Open-Shell Setup",MB_YESNO|MB_ICONWARNING)==IDNO) - return 99; - } -*/ - - DWORD version; - { - HKEY hKey; - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,L"SOFTWARE\\OpenShell\\OpenShell",0,KEY_READ|(b64?KEY_WOW64_64KEY:0),&hKey)==ERROR_SUCCESS) - { - DWORD size=sizeof(version); - if (RegQueryValueEx(hKey,L"Version",0,NULL,(BYTE*)&version,&size)!=ERROR_SUCCESS) - version=0; - RegCloseKey(hKey); - } - } - wchar_t msiName[_MAX_PATH]; Sprintf(msiName,_countof(msiName),L"%%ALLUSERSPROFILE%%\\OpenShellSetup%d_%d_%d_%d.msi",b64?64:32,HIWORD(pVer->dwProductVersionMS),LOWORD(pVer->dwProductVersionMS),HIWORD(pVer->dwProductVersionLS)); DoEnvironmentSubst(msiName,_countof(msiName)); diff --git a/Src/Setup/Setup.rc b/Src/Setup/Setup.rc index dc06f93..8d479c1 100644 --- a/Src/Setup/Setup.rc +++ b/Src/Setup/Setup.rc @@ -104,41 +104,6 @@ IDR_MSI_FILE32 MSI_FILE "Temp\\Setup32.msi_" IDR_MSI_FILE64 MSI_FILE "Temp\\Setup64.msi_" IDR_MSI_CHECKSUM MSI_FILE "msichecksum.bin" -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOGPWD DIALOGEX 0, 0, 154, 75 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Open-Shell 2.8.0 (closed beta)" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "This beta version is password-protected. Please enter the password:",IDC_STATIC,7,7,140,17 - EDITTEXT IDC_EDITPWD,7,32,140,14,ES_AUTOHSCROLL - DEFPUSHBUTTON "OK",IDOK,43,54,50,14 - PUSHBUTTON "Cancel",IDCANCEL,97,54,50,14 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_DIALOGPWD, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 147 - TOPMARGIN, 7 - BOTTOMMARGIN, 68 - END -END -#endif // APSTUDIO_INVOKED - ///////////////////////////////////////////////////////////////////////////// // diff --git a/Src/Setup/Setup.vcxproj b/Src/Setup/Setup.vcxproj index a27abe2..88a78c6 100644 --- a/Src/Setup/Setup.vcxproj +++ b/Src/Setup/Setup.vcxproj @@ -123,7 +123,6 @@ - diff --git a/Src/Setup/Setup.vcxproj.filters b/Src/Setup/Setup.vcxproj.filters index be09bad..6138859 100644 --- a/Src/Setup/Setup.vcxproj.filters +++ b/Src/Setup/Setup.vcxproj.filters @@ -58,11 +58,8 @@ Setup Files - - Setup Files - - + \ No newline at end of file diff --git a/Src/Setup/resource.h b/Src/Setup/resource.h index fb9313d..85076b8 100644 --- a/Src/Setup/resource.h +++ b/Src/Setup/resource.h @@ -9,7 +9,6 @@ #define IDR_MSI_FILE32 132 #define IDR_MSI_FILE64 164 #define IDS_ERR_INTERNAL 166 -#define IDD_DIALOGPWD 166 #define IDS_ERR_EXTRACT 167 #define IDR_MSI_CHECKSUM 167 #define IDS_ERR_WIN7 169