]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2656. [func] win32: add a "tools only" check box to the installer
authorMark Andrews <marka@isc.org>
Wed, 2 Sep 2009 00:29:56 +0000 (00:29 +0000)
committerMark Andrews <marka@isc.org>
Wed, 2 Sep 2009 00:29:56 +0000 (00:29 +0000)
                        which causes it to only install dig, host, nslookup,
                        nsupdate and relevent dlls.  [RT #19998]

CHANGES
bin/win32/BINDInstall/BINDInstall.rc
bin/win32/BINDInstall/BINDInstallDlg.cpp
bin/win32/BINDInstall/BINDInstallDlg.h
bin/win32/BINDInstall/resource.h

diff --git a/CHANGES b/CHANGES
index 3f052f63316757c804f8c18a1336a3370faf56a6..e9529c65a4b3856feb444f627c29ab9f5c85bcc3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+2656.  [func]          win32: add a "tools only" check box to the installer
+                       which causes it to only install dig, host, nslookup,
+                       nsupdate and relevent dlls.  [RT #19998]
+
 2655.  [doc]           Document that key-directory does not affect
                        rndc.key.  [RT #20155]
 
index 8bcb636b2e4eefb76f71f8d1625a350d50d80f6c..8e947346890a4f23b6bb3fe9af21ebc226d363c4 100644 (file)
@@ -1,4 +1,4 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
 //
 #include "resource.h"
 
@@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE DISCARDABLE 
+1 TEXTINCLUDE 
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE DISCARDABLE 
+2 TEXTINCLUDE 
 BEGIN
     "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE DISCARDABLE 
+3 TEXTINCLUDE 
 BEGIN
     "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
     "#define _AFX_NO_OLE_RESOURCES\r\n"
@@ -66,73 +66,65 @@ END
 
 // Icon with lowest ID value placed first to ensure application icon
 // remains consistent on all systems.
-IDR_MAINFRAME           ICON    DISCARDABLE     "res\\BINDInstall.ico"
+IDR_MAINFRAME           ICON                    "res\\BINDInstall.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 //
 // Dialog
 //
 
-IDD_BINDINSTALL_DIALOG DIALOGEX 0, 0, 210, 301
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
-    WS_SYSMENU
+IDD_BINDINSTALL_DIALOG DIALOGEX 0, 0, 210, 311
+STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
 EXSTYLE WS_EX_APPWINDOW
 CAPTION "BIND 9 Installer"
-FONT 8, "MS Sans Serif",0,0,0x1
+FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
     EDITTEXT        IDC_TARGETDIR,7,62,196,14,ES_AUTOHSCROLL
     EDITTEXT        IDC_ACCOUNT_NAME,7,94,196,14,ES_AUTOHSCROLL
-    EDITTEXT        IDC_ACCOUNT_PASSWORD,7,122,196,14,ES_PASSWORD | 
-                    ES_AUTOHSCROLL
-    EDITTEXT        IDC_ACCOUNT_PASSWORD_CONFIRM,7,151,196,14,ES_PASSWORD | 
-                    ES_AUTOHSCROLL
+    EDITTEXT        IDC_ACCOUNT_PASSWORD,7,122,196,14,ES_PASSWORD | ES_AUTOHSCROLL
+    EDITTEXT        IDC_ACCOUNT_PASSWORD_CONFIRM,7,151,196,14,ES_PASSWORD | ES_AUTOHSCROLL
     DEFPUSHBUTTON   "&Install",IDC_INSTALL,153,7,50,14
     PUSHBUTTON      "E&xit",IDC_EXIT,153,39,50,14
-    CONTROL         "&Automatic Startup",IDC_AUTO_START,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,14,190,72,10
+    CONTROL         "&Tools Only",IDC_TOOLS_ONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,185,72,10
+    CONTROL         "&Automatic Startup",IDC_AUTO_START,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,195,72,10
     CONTROL         "&Keep Config Files After Uninstall",IDC_KEEP_FILES,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,200,116,10
-    CONTROL         "&Start BIND Service After Install",IDC_START,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,14,210,113,10
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,205,116,10
+    CONTROL         "&Start BIND Service After Install",IDC_START,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,215,113,10
     PUSHBUTTON      "&Uninstall",IDC_UNINSTALL,153,23,50,14
     PUSHBUTTON      "Browse",IDC_BROWSE,7,22,50,14
     LTEXT           "Target Directory:",IDC_STATIC,7,53,54,8
-    GROUPBOX        "Progress",IDC_STATIC,7,224,196,70
-    RTEXT           "",IDC_COPY_TAG,14,261,78,8
-    LTEXT           "",IDC_COPY_FILE,105,261,90,8
-    RTEXT           "",IDC_SERVICE_TAG,15,271,77,8
-    LTEXT           "",IDC_REG_SERVICE,105,271,89,8
-    RTEXT           "",IDC_MESSAGE_TAG,15,281,77,8
-    LTEXT           "",IDC_REG_MESSAGE,105,281,88,8
-    RTEXT           "",IDC_DIR_TAG,15,251,77,8
-    GROUPBOX        "Options",IDC_STATIC,7,172,196,49
-    CTEXT           "Version Unknown",IDC_VERSION,7,7,61,10,SS_CENTERIMAGE | 
-                    SS_SUNKEN
-    RTEXT           "Current Operation:",IDC_CURRENT_TAG,34,235,58,8
-    LTEXT           "",IDC_CURRENT,105,235,90,8
-    LTEXT           "",IDC_CREATE_DIR,105,251,88,8
+    GROUPBOX        "Progress",IDC_STATIC,7,234,196,70
+    RTEXT           "",IDC_COPY_TAG,14,271,78,8
+    LTEXT           "",IDC_COPY_FILE,105,271,90,8
+    RTEXT           "",IDC_SERVICE_TAG,15,281,77,8
+    LTEXT           "",IDC_REG_SERVICE,105,281,89,8
+    RTEXT           "",IDC_MESSAGE_TAG,15,291,77,8
+    LTEXT           "",IDC_REG_MESSAGE,105,291,88,8
+    RTEXT           "",IDC_DIR_TAG,15,261,77,8
+    GROUPBOX        "Options",IDC_STATIC,7,172,196,60
+    CTEXT           "Version Unknown",IDC_VERSION,7,7,61,10,SS_CENTERIMAGE | SS_SUNKEN
+    RTEXT           "Current Operation:",IDC_CURRENT_TAG,34,245,58,8
+    LTEXT           "",IDC_CURRENT,105,245,90,8
+    LTEXT           "",IDC_CREATE_DIR,105,261,88,8
     LTEXT           "Service Account Name",IDC_STATIC,7,84,74,8
     LTEXT           "Service Account Password",IDC_STATIC,7,112,86,8
-    LTEXT           "Confirm Service Account Password",IDC_STATIC,7,140,112,
-                    8
+    LTEXT           "Confirm Service Account Password",IDC_STATIC,7,140,112,8
 END
 
-IDD_BROWSE DIALOG DISCARDABLE  0, 0, 227, 117
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+IDD_BROWSE DIALOG  0, 0, 227, 117
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Select Directory"
 FONT 8, "MS Sans Serif"
 BEGIN
     DEFPUSHBUTTON   "OK",IDOK,170,7,50,14
     PUSHBUTTON      "Cancel",IDCANCEL,170,24,50,14
-    LISTBOX         IDC_DIRLIST,7,28,155,82,LBS_SORT | LBS_NOINTEGRALHEIGHT | 
-                    WS_VSCROLL | WS_TABSTOP
+    LISTBOX         IDC_DIRLIST,7,28,155,82,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
     EDITTEXT        IDC_CURDIR,7,7,155,14,ES_AUTOHSCROLL
-    COMBOBOX        IDC_DRIVES,170,98,50,74,CBS_DROPDOWNLIST | CBS_SORT | 
-                    WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_DRIVES,170,98,50,74,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
 END
 
-IDD_DIALOG1 DIALOG DISCARDABLE  0, 0, 186, 95
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+IDD_DIALOG1 DIALOG  0, 0, 186, 95
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Dialog"
 FONT 8, "MS Sans Serif"
 BEGIN
@@ -141,7 +133,6 @@ BEGIN
 END
 
 
-#ifndef _MAC
 /////////////////////////////////////////////////////////////////////////////
 //
 // Version
@@ -164,18 +155,14 @@ BEGIN
     BEGIN
         BLOCK "040904b0"
         BEGIN
-            VALUE "Comments", "\0"
-            VALUE "CompanyName", "Internet Software Consortium\0"
-            VALUE "FileDescription", "ISC BIND Install Utility\0"
-            VALUE "FileVersion", "2.0.0\0"
-            VALUE "InternalName", "BINDInstall\0"
-            VALUE "LegalCopyright", "Copyright © 2000\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "OriginalFilename", "BINDInstall.EXE\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "ISC BIND\0"
-            VALUE "ProductVersion", "9.3.0\0"
-            VALUE "SpecialBuild", "\0"
+            VALUE "CompanyName", "Internet Software Consortium"
+            VALUE "FileDescription", "ISC BIND Install Utility"
+            VALUE "FileVersion", "2.0.0"
+            VALUE "InternalName", "BINDInstall"
+            VALUE "LegalCopyright", "Copyright © 2000"
+            VALUE "OriginalFilename", "BINDInstall.EXE"
+            VALUE "ProductName", "ISC BIND"
+            VALUE "ProductVersion", "9.7.0"
         END
     END
     BLOCK "VarFileInfo"
@@ -184,8 +171,6 @@ BEGIN
     END
 END
 
-#endif    // !_MAC
-
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -193,7 +178,7 @@ END
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
+GUIDELINES DESIGNINFO 
 BEGIN
     IDD_BINDINSTALL_DIALOG, DIALOG
     BEGIN
@@ -212,6 +197,7 @@ BEGIN
         HORZGUIDE, 265
         HORZGUIDE, 275
         HORZGUIDE, 285
+        HORZGUIDE, 295
     END
 
     IDD_BROWSE, DIALOG
@@ -238,7 +224,7 @@ END
 // String Table
 //
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE 
 BEGIN
     IDS_MAINFRAME           "BIND 9 Installer"
     IDS_CREATEDIR           "Directory %s does not exist.\nDo you wish to create it?"
@@ -253,7 +239,7 @@ BEGIN
     IDS_UNINSTALL_DONE      "BIND Uninstall Completed"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE 
 BEGIN
     IDS_CREATE_KEY          "Creating BIND registry key"
     IDS_ADD_REMOVE          "Setting up Add/Remove Programs entry"
@@ -273,7 +259,7 @@ BEGIN
     IDS_START_SERVICE       "Starting BIND service"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE 
 BEGIN
     IDS_UNINSTALL_DIR       "Remove Directories..."
     IDS_UNINSTALL_FILES     "Delete Files..."
@@ -293,7 +279,7 @@ BEGIN
     IDS_ERR_CREATE_KEY      "An error occured while creating registry keys\n(%s)"
 END
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE 
 BEGIN
     IDS_ERR_SET_VALUE       "An error occured while setting registry key values\n(%s)"
     IDS_NO_VERSION          "Version Unknown"
index 539244ea7dc79a2697682eda1ed5c3503a3db0c8..bd7ff8a46c1455f04b8a1ff7deef085017751e23 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: BINDInstallDlg.cpp,v 1.37.24.2 2009/01/19 23:47:01 tbox Exp $ */
+/* $Id: BINDInstallDlg.cpp,v 1.37.24.3 2009/09/02 00:29:56 marka Exp $ */
 
 /*
  * Copyright (c) 1999-2000 by Nortel Networks Corporation
@@ -100,54 +100,53 @@ typedef struct _filedata {
        int destination;
        int importance;
        BOOL checkVer;
-
+       BOOL withTools;
 } FileData;
 
 const FileData installFiles[] =
 {
 #ifdef BINARIES_INSTALL
 #  ifdef DEBUG_BINARIES
-       {"msvcrtd.dll", FileData::WinSystem, FileData::Critical, TRUE},
+       {"msvcrtd.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE},
 #  endif
 #  ifdef RELEASE_BINARIES
-       {"msvcrt.dll", FileData::WinSystem, FileData::Critical, TRUE},
+       {"msvcrt.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE},
 #  endif
 #endif
 #if _MSC_VER < 1400
 #if _MSC_VER >= 1310
-       {"mfc71.dll", FileData::WinSystem, FileData::Critical, TRUE},
-       {"msvcr71.dll", FileData::WinSystem, FileData::Critical, TRUE},
+       {"mfc71.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE},
+       {"msvcr71.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE},
 #elif _MSC_VER > 1200 && _MSC_VER < 1310
-       {"mfc70.dll", FileData::WinSystem, FileData::Critical, TRUE},
-       {"msvcr70.dll", FileData::WinSystem, FileData::Critical, TRUE},
+       {"mfc70.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE},
+       {"msvcr70.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE},
 #endif
 #endif
-       {"bindevt.dll", FileData::BinDir, FileData::Normal, FALSE},
-       {"libbind9.dll", FileData::BinDir, FileData::Critical, FALSE},
-       {"libisc.dll", FileData::BinDir, FileData::Critical, FALSE},
-       {"libisccfg.dll", FileData::BinDir, FileData::Critical, FALSE},
-       {"libisccc.dll", FileData::BinDir, FileData::Critical, FALSE},
-       {"libdns.dll", FileData::BinDir, FileData::Critical, FALSE},
-       {"liblwres.dll", FileData::BinDir, FileData::Critical, FALSE},
-       {"libeay32.dll", FileData::BinDir, FileData::Critical, FALSE},
-       {"named.exe", FileData::BinDir, FileData::Critical, FALSE},
-       {"nsupdate.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"BINDInstall.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"rndc.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"dig.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"host.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"nslookup.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"rndc-confgen.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"dnssec-keygen.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"dnssec-signzone.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"named-checkconf.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"named-checkzone.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"named-compilezone.exe", FileData::BinDir, FileData::Normal, FALSE},
-       {"readme1st.txt", FileData::BinDir, FileData::Trivial, FALSE},
+       {"bindevt.dll", FileData::BinDir, FileData::Normal, FALSE, TRUE},
+       {"libbind9.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE},
+       {"libisc.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE},
+       {"libisccfg.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE},
+       {"libisccc.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE},
+       {"libdns.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE},
+       {"liblwres.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE},
+       {"libeay32.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE},
+       {"named.exe", FileData::BinDir, FileData::Critical, FALSE, FALSE},
+       {"nsupdate.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE},
+       {"BINDInstall.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE},
+       {"rndc.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE},
+       {"dig.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE},
+       {"host.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE},
+       {"nslookup.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE},
+       {"rndc-confgen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE},
+       {"dnssec-keygen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE},
+       {"dnssec-signzone.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE},
+       {"named-checkconf.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE},
+       {"named-checkzone.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE},
+       {"named-compilezone.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE},
+       {"readme1st.txt", FileData::BinDir, FileData::Trivial, FALSE, TRUE},
        {NULL, -1, -1}
 };
 
-
 /////////////////////////////////////////////////////////////////////////////
 // CBINDInstallDlg dialog
 
@@ -158,6 +157,7 @@ CBINDInstallDlg::CBINDInstallDlg(CWnd* pParent /*=NULL*/)
        //{{AFX_DATA_INIT(CBINDInstallDlg)
        m_targetDir = _T("");
        m_version = _T("");
+       m_toolsOnly = FALSE;
        m_autoStart = FALSE;
        m_keepFiles = FALSE;
        m_current = _T("");
@@ -192,6 +192,7 @@ void CBINDInstallDlg::DoDataExchange(CDataExchange* pDX) {
        DDX_Text(pDX, IDC_ACCOUNT_NAME, m_accountName);
        DDX_Text(pDX, IDC_ACCOUNT_PASSWORD, m_accountPassword);
        DDX_Text(pDX, IDC_ACCOUNT_PASSWORD_CONFIRM, m_accountPasswordConfirm);
+       DDX_Check(pDX, IDC_TOOLS_ONLY, m_toolsOnly);
        DDX_Check(pDX, IDC_AUTO_START, m_autoStart);
        DDX_Check(pDX, IDC_KEEP_FILES, m_keepFiles);
        DDX_Text(pDX, IDC_CURRENT, m_current);
@@ -400,47 +401,49 @@ void CBINDInstallDlg::OnInstall() {
 
        UpdateData();
 
-       /*
-        * Check that the Passwords entered match.
-        */
-       if (m_accountPassword != m_accountPasswordConfirm) {
-               MsgBox(IDS_ERR_PASSWORD);
-               return;
-       }
+       if (!m_toolsOnly) {
+               /*
+                * Check that the Passwords entered match.
+                */
+               if (m_accountPassword != m_accountPasswordConfirm) {
+                       MsgBox(IDS_ERR_PASSWORD);
+                       return;
+               }
 
-       /*
-        * Check that there is not leading / trailing whitespace.
-        * This is for compatibility with the standard password dialog.
-        * Passwords really should be treated as opaque blobs.
-        */
-       oldlen = m_accountPassword.GetLength();
-       m_accountPassword.TrimLeft();
-       m_accountPassword.TrimRight();
-       if (m_accountPassword.GetLength() != oldlen) {
-               MsgBox(IDS_ERR_WHITESPACE);
-               return;
-       }
+               /*
+                * Check that there is not leading / trailing whitespace.
+                * This is for compatibility with the standard password dialog.
+                * Passwords really should be treated as opaque blobs.
+                */
+               oldlen = m_accountPassword.GetLength();
+               m_accountPassword.TrimLeft();
+               m_accountPassword.TrimRight();
+               if (m_accountPassword.GetLength() != oldlen) {
+                       MsgBox(IDS_ERR_WHITESPACE);
+                       return;
+               }
 
-       /*
-        * Check the entered account name.
-        */
-       if (ValidateServiceAccount() == FALSE)
-               return;
+               /*
+                * Check the entered account name.
+                */
+               if (ValidateServiceAccount() == FALSE)
+                       return;
 
-       /*
-        * For Registration we need to know if account was changed.
-        */
-       if (m_accountName != m_currentAccount)
-               m_accountUsed = FALSE;
+               /*
+                * For Registration we need to know if account was changed.
+                */
+               if (m_accountName != m_currentAccount)
+                       m_accountUsed = FALSE;
 
-       if (m_accountUsed == FALSE && m_serviceExists == FALSE)
-       {
-       /*
-        * Check that the Password is not null.
-        */
-               if (m_accountPassword.GetLength() == 0) {
-                       MsgBox(IDS_ERR_NULLPASSWORD);
-                       return;
+               if (m_accountUsed == FALSE && m_serviceExists == FALSE)
+               {
+               /*
+                * Check that the Password is not null.
+                */
+                       if (m_accountPassword.GetLength() == 0) {
+                               MsgBox(IDS_ERR_NULLPASSWORD);
+                               return;
+                       }
                }
        }
 
@@ -464,14 +467,16 @@ void CBINDInstallDlg::OnInstall() {
                }
        }
 
-       if (m_accountExists == FALSE) {
-               success = CreateServiceAccount(m_accountName.GetBuffer(30),
-                                               m_accountPassword.GetBuffer(30));
-               if (success == FALSE) {
-                       MsgBox(IDS_CREATEACCOUNT_FAILED);
-                       return;
+       if (!m_toolsOnly) {
+               if (m_accountExists == FALSE) {
+                       success = CreateServiceAccount(m_accountName.GetBuffer(30),
+                                                       m_accountPassword.GetBuffer(30));
+                       if (success == FALSE) {
+                               MsgBox(IDS_CREATEACCOUNT_FAILED);
+                               return;
+                       }
+                       m_accountExists = TRUE;
                }
-               m_accountExists = TRUE;
        }
 
        ProgramGroup(FALSE);
@@ -496,7 +501,8 @@ void CBINDInstallDlg::OnInstall() {
        try {
                CreateDirs();
                CopyFiles();
-               RegisterService();
+               if (!m_toolsOnly)
+                       RegisterService();
                RegisterMessages();
 
                HKEY hKey;
@@ -597,6 +603,8 @@ void CBINDInstallDlg::CopyFiles() {
        CString destFile;
 
        for (int i = 0; installFiles[i].filename; i++) {
+               if (m_toolsOnly && !installFiles[i].withTools)
+                       continue;
                SetCurrent(IDS_COPY_FILE, installFiles[i].filename);
 
                destFile = DestDir(installFiles[i].destination) + "\\" +
@@ -775,6 +783,9 @@ CBINDInstallDlg::RegisterService() {
        SC_HANDLE hService;
        CString StartName = ".\\" + m_accountName;
 
+       if(m_toolsOnly)
+               return;
+
        /*
         * We need to change the service rather than create it
         * if the service already exists. Do nothing if we are already
@@ -830,6 +841,9 @@ CBINDInstallDlg::UpdateService() {
        SC_HANDLE hService;
        CString StartName = ".\\" + m_accountName;
 
+       if(m_toolsOnly)
+               return;
+
        SetCurrent(IDS_OPEN_SCM);
        hSCManager= OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
        if (!hSCManager) {
index 597f7a3636e9f247b9201c335262c5507c1cd08a..616c488faa06bc46129716f0737aa14203dfed77 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: BINDInstallDlg.h,v 1.8 2007/06/19 23:47:07 tbox Exp $ */
+/* $Id: BINDInstallDlg.h,v 1.8.128.1 2009/09/02 00:29:56 marka Exp $ */
 
 /*
  * Copyright (c) 1999-2000 by Nortel Networks Corporation
@@ -48,6 +48,7 @@ public:
        CString m_version;
        BOOL    m_autoStart;
        BOOL    m_keepFiles;
+       BOOL    m_toolsOnly;
        CString m_current;
        BOOL    m_startOnInstall;
        //}}AFX_DATA
index 14b50846aa20e75b072a4235e77b3e3c28d14855..b176fe0930587e557c72efa4be8a13986b2d8368 100644 (file)
@@ -90,6 +90,7 @@
 #define IDC_ACCOUNT_NAME                1030
 #define IDC_ACCOUNT_PASSWORD            1031
 #define IDC_ACCOUNT_PASSWORD_CONFIRM    1032
+#define IDC_TOOLS_ONLY                 1033
 
 // Next default values for new objects
 //