Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
637
Issues
637
List
Boards
Labels
Service Desk
Milestones
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
2bee3c2e
Commit
2bee3c2e
authored
Aug 25, 2009
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CHANGES
parent
a0ba5a50
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
144 deletions
+146
-144
bin/win32/BINDInstall/BINDInstall.rc
bin/win32/BINDInstall/BINDInstall.rc
+48
-62
bin/win32/BINDInstall/BINDInstallDlg.cpp
bin/win32/BINDInstall/BINDInstallDlg.cpp
+95
-81
bin/win32/BINDInstall/BINDInstallDlg.h
bin/win32/BINDInstall/BINDInstallDlg.h
+2
-1
bin/win32/BINDInstall/resource.h
bin/win32/BINDInstall/resource.h
+1
-0
No files found.
bin/win32/BINDInstall/BINDInstall.rc
View file @
2bee3c2e
//
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"
...
...
bin/win32/BINDInstall/BINDInstallDlg.cpp
View file @
2bee3c2e
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: BINDInstallDlg.cpp,v 1.4
2 2009/07/17 06:25:42 each
Exp $ */
/* $Id: BINDInstallDlg.cpp,v 1.4
3 2009/08/25 06:47:06 marka
Exp $ */
/*
* Copyright (c) 1999-2000 by Nortel Networks Corporation
...
...
@@ -102,61 +102,60 @@ 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
},
{
"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
},
#ifdef HAVE_LIBXML2
{
"libxml2.dll"
,
FileData
::
BinDir
,
FileData
::
Critical
,
FALSE
},
{
"libxml2.dll"
,
FileData
::
BinDir
,
FileData
::
Critical
,
FALSE
,
TRUE
},
#endif
{
"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
},
{
"ddns-confgen.exe"
,
FileData
::
BinDir
,
FileData
::
Normal
,
FALSE
},
{
"dnssec-keygen.exe"
,
FileData
::
BinDir
,
FileData
::
Normal
,
FALSE
},
{
"dnssec-signzone.exe"
,
FileData
::
BinDir
,
FileData
::
Normal
,
FALSE
},
{
"dnssec-dsfromkey.exe"
,
FileData
::
BinDir
,
FileData
::
Normal
,
FALSE
},
{
"dnssec-keyfromlabel.exe"
,
FileData
::
BinDir
,
FileData
::
Normal
,
FALSE
},
{
"dnssec-revoke.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
},
{
"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
},
{
"ddns-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
},
{
"dnssec-dsfromkey.exe"
,
FileData
::
BinDir
,
FileData
::
Normal
,
FALSE
,
FALSE
},
{
"dnssec-keyfromlabel.exe"
,
FileData
::
BinDir
,
FileData
::
Normal
,
FALSE
,
FALSE
},
{
"dnssec-revoke.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
...
...
@@ -167,6 +166,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
(
""
);
...
...
@@ -201,6 +201,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
);
...
...
@@ -409,47 +410,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
;
}
}
}
...
...
@@ -473,14 +476,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
);
...
...
@@ -505,7 +510,8 @@ void CBINDInstallDlg::OnInstall() {
try
{
CreateDirs
();
CopyFiles
();
RegisterService
();
if
(
!
m_toolsOnly
)
RegisterService
();
RegisterMessages
();
HKEY
hKey
;
...
...
@@ -606,6 +612,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
)
+
"
\\
"
+
...
...
@@ -784,6 +792,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
...
...
@@ -839,6 +850,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
)
{
...
...
bin/win32/BINDInstall/BINDInstallDlg.h
View file @
2bee3c2e
...
...
@@ -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.
9 2009/08/25 06:47:06 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
...
...
bin/win32/BINDInstall/resource.h
View file @
2bee3c2e
...
...
@@ -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
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment