BINDInstallDlg.cpp revision e20788e1216ed720aefa84f3295f7899d9f28c22
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * Portions Copyright (C) 2004-2010, 2013, 2014 Internet Systems Consortium, Inc. ("ISC")
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * Portions Copyright (C) 2001, 2003 Internet Software Consortium.
8a718a0c547e256edabd2c91f77ed668d1dfc7f8Evan Hunt * Permission to use, copy, modify, and/or distribute this software for any
8a718a0c547e256edabd2c91f77ed668d1dfc7f8Evan Hunt * purpose with or without fee is hereby granted, provided that the above
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * copyright notice and this permission notice appear in all copies.
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8a718a0c547e256edabd2c91f77ed668d1dfc7f8Evan Hunt * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
8a718a0c547e256edabd2c91f77ed668d1dfc7f8Evan Hunt * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8a718a0c547e256edabd2c91f77ed668d1dfc7f8Evan Hunt * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8a718a0c547e256edabd2c91f77ed668d1dfc7f8Evan Hunt * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8a718a0c547e256edabd2c91f77ed668d1dfc7f8Evan Hunt * PERFORMANCE OF THIS SOFTWARE.
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt/* $Id: BINDInstallDlg.cpp,v 1.48 2010/01/07 23:48:54 tbox Exp $ */
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * Copyright (c) 1999-2000 by Nortel Networks Corporation
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * Permission to use, copy, modify, and distribute this software for any
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * purpose with or without fee is hereby granted, provided that the above
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * copyright notice and this permission notice appear in all copies.
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS
#ifdef BINARIES_INSTALL
#include "stdafx.h"
#include "BINDInstall.h"
#include "BINDInstallDlg.h"
#include "DirBrowse.h"
#include <winsvc.h>
#include <direct.h>
#include "AccountInfo.h"
#include "versioninfo.h"
#include <config.h>
#ifdef _DEBUG
#define new DEBUG_NEW
typedef struct _xexception
} Exception;
typedef struct _filedata {
char *filename;
int destination;
int importance;
} FileData;
#ifdef BINARIES_INSTALL
# ifdef DEBUG_BINARIES
# ifdef RELEASE_BINARIES
#ifdef USE_PKCS11
#ifdef OPENSSL
#ifdef HAVE_LIBXML2
#ifdef USE_GSSAPI
#ifndef _WIN64
#ifdef HAVE_GEOIP
#ifdef WITH_IDN
#ifdef USE_PKCS11
#ifdef USE_PYTHON
== ERROR_SUCCESS) {
if (IsIconic()) {
EndDialog(0);
UpdateData();
if (CheckBINDService())
if (!hSCManager) {
int oldlen;
if (CheckBINDService())
InstallTags();
UpdateData();
if (!m_toolsOnly) {
/*system(".\\Vcredist_x86.exe /q:a /c:\"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log\"");*/
CreateDirs();
CopyFiles();
if (!m_toolsOnly)
if (m_startOnInstall)
catch(Exception e) {
if (!m_keepFiles) {
if (uninstall)
GetErrMessage()));
GetErrMessage()));
if (uninstall)
if (!m_keepFiles) {
if (uninstall)
unsigned int PrivCount = 0;
unsigned int totalGroups = 0;
int status;
char *name;
return (TRUE);
return (FALSE);
return (FALSE);
return (TRUE);
return (FALSE);
return (TRUE);
if (!hSCManager)
if (m_autoStart)
if (hService)
if (hSCManager)
if(m_toolsOnly)
if (!hSCManager) {
if (m_autoStart)
if (!hService)
if (hSCManager)
!= TRUE) {
if (hService)
if (hSCManager)
if (hService)
if (hSCManager)
if (uninstall)
!= ERROR_SUCCESS)
!= ERROR_SUCCESS)
if (hKey)
if (uninstall)
if (!hSCManager) {
if (!hBINDSvc) {
if (!hSCManager) {
if (!hBINDSvc) {
if (hSCManager) {
if (hBINDSvc) {
if (!rc)
return (FALSE);
DWORD len = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, err == -1 ? GetLastError() : err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &msgBuf, 0, NULL );
return(buf);
if (itemList) {
if (create) {
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID *)&psl);
switch(destination) {
return m_targetDir;
return m_binDir;
return m_etcDir;
return m_winSysDir;