2005-03-03 11:08:38 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
|
|
|
//
|
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
2007-10-09 11:35:47 +00:00
|
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2005-03-03 11:08:38 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
// stdafx.h : include file for standard system include files,
|
|
|
|
// or project specific include files that are used frequently, but
|
|
|
|
// are changed infrequently
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _STDAFX_H_
|
|
|
|
#define _STDAFX_H_
|
|
|
|
|
|
|
|
// Windows System Libraries
|
|
|
|
//
|
|
|
|
|
- WINSETUP: Update CACreateBOINCUsers.
- WINSETUP: Create CACreateBOINCGroups.
- WINSETUP: Create CAGrantBOINCMasterRights.
- WINSETUP: Create CAGrantBOINCProjectRights.
- WINSETUP: Remove CACreateVBSShortcut.
- WINSETUP: Remove CAGrantServiceExecutionRight.
- WINSETUP: Remove CAMigrateCPDNBBC.
- WINSETUP: Remove CAPopulateServiceAccount.
- WINSETUP: Remove CAValidateServiceAccount.
- WINSETUP: Remove CAVerifyServiceExecutionRight.
- WINSETUP: Remove CAVerifyServicePassword.
- WINSETUP: Hookup new custom actions
NOTE: For some reason the advanced configuration screen
checkboxes are not working, so the CA's are setup to run
always to test them out.
win_build/installerv2/
BOINC.ism
win_build/installerv2/redist/Windows/src/boinccas/
CAGrantServiceExecutionRight.cpp, .h (removed)
CAMigrateCPDNBBC.cpp, .h (removed)
CAPopulateServiceAccount.cpp, .h (removed)
CAValidateServiceAccount.cpp, .h (removed)
CAVerifyServiceExecutionRight.cpp, .h (removed)
CAVerifyServicePassword.cpp, .h (removed)
CACreateBOINCUsers.cpp
CACreateBOINCGroups.cpp, .h (added)
CAGrantBOINCMasterRights.cpp, .h (added)
CAGrantBOINCProjectRights.cpp, .h (added)
svn path=/trunk/boinc/; revision=14313
2007-11-28 15:10:21 +00:00
|
|
|
// Visual Studio 2005 has extended the C Run-Time Library by including "secure"
|
|
|
|
// runtime functions and deprecating the previous function prototypes. Since
|
|
|
|
// we need to use the previous prototypes to maintain compatibility with other
|
|
|
|
// platforms we are going to disable the deprecation warnings if we are compiling
|
|
|
|
// on Visual Studio 2005
|
|
|
|
#if _MSC_VER >= 1400
|
|
|
|
#ifndef _CRT_SECURE_NO_DEPRECATE
|
|
|
|
#define _CRT_SECURE_NO_DEPRECATE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2005-03-03 11:08:38 +00:00
|
|
|
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
|
|
|
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
|
|
|
|
- WINSETUP: Update CACreateBOINCUsers.
- WINSETUP: Create CACreateBOINCGroups.
- WINSETUP: Create CAGrantBOINCMasterRights.
- WINSETUP: Create CAGrantBOINCProjectRights.
- WINSETUP: Remove CACreateVBSShortcut.
- WINSETUP: Remove CAGrantServiceExecutionRight.
- WINSETUP: Remove CAMigrateCPDNBBC.
- WINSETUP: Remove CAPopulateServiceAccount.
- WINSETUP: Remove CAValidateServiceAccount.
- WINSETUP: Remove CAVerifyServiceExecutionRight.
- WINSETUP: Remove CAVerifyServicePassword.
- WINSETUP: Hookup new custom actions
NOTE: For some reason the advanced configuration screen
checkboxes are not working, so the CA's are setup to run
always to test them out.
win_build/installerv2/
BOINC.ism
win_build/installerv2/redist/Windows/src/boinccas/
CAGrantServiceExecutionRight.cpp, .h (removed)
CAMigrateCPDNBBC.cpp, .h (removed)
CAPopulateServiceAccount.cpp, .h (removed)
CAValidateServiceAccount.cpp, .h (removed)
CAVerifyServiceExecutionRight.cpp, .h (removed)
CAVerifyServicePassword.cpp, .h (removed)
CACreateBOINCUsers.cpp
CACreateBOINCGroups.cpp, .h (added)
CAGrantBOINCMasterRights.cpp, .h (added)
CAGrantBOINCProjectRights.cpp, .h (added)
svn path=/trunk/boinc/; revision=14313
2007-11-28 15:10:21 +00:00
|
|
|
#ifndef WINVER // Allow use of features specific to Windows 2000 or later.
|
|
|
|
#define WINVER 0x0500 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
2005-03-03 11:08:38 +00:00
|
|
|
#endif
|
|
|
|
|
- WINSETUP: Update CACreateBOINCUsers.
- WINSETUP: Create CACreateBOINCGroups.
- WINSETUP: Create CAGrantBOINCMasterRights.
- WINSETUP: Create CAGrantBOINCProjectRights.
- WINSETUP: Remove CACreateVBSShortcut.
- WINSETUP: Remove CAGrantServiceExecutionRight.
- WINSETUP: Remove CAMigrateCPDNBBC.
- WINSETUP: Remove CAPopulateServiceAccount.
- WINSETUP: Remove CAValidateServiceAccount.
- WINSETUP: Remove CAVerifyServiceExecutionRight.
- WINSETUP: Remove CAVerifyServicePassword.
- WINSETUP: Hookup new custom actions
NOTE: For some reason the advanced configuration screen
checkboxes are not working, so the CA's are setup to run
always to test them out.
win_build/installerv2/
BOINC.ism
win_build/installerv2/redist/Windows/src/boinccas/
CAGrantServiceExecutionRight.cpp, .h (removed)
CAMigrateCPDNBBC.cpp, .h (removed)
CAPopulateServiceAccount.cpp, .h (removed)
CAValidateServiceAccount.cpp, .h (removed)
CAVerifyServiceExecutionRight.cpp, .h (removed)
CAVerifyServicePassword.cpp, .h (removed)
CACreateBOINCUsers.cpp
CACreateBOINCGroups.cpp, .h (added)
CAGrantBOINCMasterRights.cpp, .h (added)
CAGrantBOINCProjectRights.cpp, .h (added)
svn path=/trunk/boinc/; revision=14313
2007-11-28 15:10:21 +00:00
|
|
|
#ifndef _WIN32_WINNT // Allow use of features specific to Windows 2000 or later.
|
|
|
|
#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
2005-03-03 11:08:38 +00:00
|
|
|
#endif
|
|
|
|
|
- WINSETUP: Update CACreateBOINCUsers.
- WINSETUP: Create CACreateBOINCGroups.
- WINSETUP: Create CAGrantBOINCMasterRights.
- WINSETUP: Create CAGrantBOINCProjectRights.
- WINSETUP: Remove CACreateVBSShortcut.
- WINSETUP: Remove CAGrantServiceExecutionRight.
- WINSETUP: Remove CAMigrateCPDNBBC.
- WINSETUP: Remove CAPopulateServiceAccount.
- WINSETUP: Remove CAValidateServiceAccount.
- WINSETUP: Remove CAVerifyServiceExecutionRight.
- WINSETUP: Remove CAVerifyServicePassword.
- WINSETUP: Hookup new custom actions
NOTE: For some reason the advanced configuration screen
checkboxes are not working, so the CA's are setup to run
always to test them out.
win_build/installerv2/
BOINC.ism
win_build/installerv2/redist/Windows/src/boinccas/
CAGrantServiceExecutionRight.cpp, .h (removed)
CAMigrateCPDNBBC.cpp, .h (removed)
CAPopulateServiceAccount.cpp, .h (removed)
CAValidateServiceAccount.cpp, .h (removed)
CAVerifyServiceExecutionRight.cpp, .h (removed)
CAVerifyServicePassword.cpp, .h (removed)
CACreateBOINCUsers.cpp
CACreateBOINCGroups.cpp, .h (added)
CAGrantBOINCMasterRights.cpp, .h (added)
CAGrantBOINCProjectRights.cpp, .h (added)
svn path=/trunk/boinc/; revision=14313
2007-11-28 15:10:21 +00:00
|
|
|
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 2000 or later.
|
|
|
|
#define _WIN32_WINDOWS 0x0500 // Change this to the appropriate value to target Windows Me or later.
|
2005-03-03 11:08:38 +00:00
|
|
|
#endif
|
|
|
|
|
- WINSETUP: Update CACreateBOINCUsers.
- WINSETUP: Create CACreateBOINCGroups.
- WINSETUP: Create CAGrantBOINCMasterRights.
- WINSETUP: Create CAGrantBOINCProjectRights.
- WINSETUP: Remove CACreateVBSShortcut.
- WINSETUP: Remove CAGrantServiceExecutionRight.
- WINSETUP: Remove CAMigrateCPDNBBC.
- WINSETUP: Remove CAPopulateServiceAccount.
- WINSETUP: Remove CAValidateServiceAccount.
- WINSETUP: Remove CAVerifyServiceExecutionRight.
- WINSETUP: Remove CAVerifyServicePassword.
- WINSETUP: Hookup new custom actions
NOTE: For some reason the advanced configuration screen
checkboxes are not working, so the CA's are setup to run
always to test them out.
win_build/installerv2/
BOINC.ism
win_build/installerv2/redist/Windows/src/boinccas/
CAGrantServiceExecutionRight.cpp, .h (removed)
CAMigrateCPDNBBC.cpp, .h (removed)
CAPopulateServiceAccount.cpp, .h (removed)
CAValidateServiceAccount.cpp, .h (removed)
CAVerifyServiceExecutionRight.cpp, .h (removed)
CAVerifyServicePassword.cpp, .h (removed)
CACreateBOINCUsers.cpp
CACreateBOINCGroups.cpp, .h (added)
CAGrantBOINCMasterRights.cpp, .h (added)
CAGrantBOINCProjectRights.cpp, .h (added)
svn path=/trunk/boinc/; revision=14313
2007-11-28 15:10:21 +00:00
|
|
|
#ifndef _WIN32_IE // Allow use of features specific to IE 5.0 or later.
|
|
|
|
#define _WIN32_IE 0x0500 // Change this to the appropriate value to target IE 5.0 or later.
|
2005-03-03 11:08:38 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _WIN32_MSI // Need to specify the smallest version of Windows Installer
|
|
|
|
#define _WIN32_MSI 200 // that supports file hashing. This is version 2.0.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2007-11-30 07:07:20 +00:00
|
|
|
// ATL Headers Files:
|
|
|
|
#include <atlbase.h>
|
|
|
|
#include <atlenc.h>
|
|
|
|
|
2005-03-03 11:08:38 +00:00
|
|
|
// Windows Header Files:
|
|
|
|
#include <windows.h>
|
|
|
|
#include <crtdbg.h>
|
|
|
|
#include <delayimp.h>
|
|
|
|
#include <msiquery.h>
|
|
|
|
#include <ntsecapi.h>
|
|
|
|
#include <lm.h>
|
2007-05-29 16:16:33 +00:00
|
|
|
#include <shlobj.h>
|
- WINSETUP: Update CACreateBOINCUsers.
- WINSETUP: Create CACreateBOINCGroups.
- WINSETUP: Create CAGrantBOINCMasterRights.
- WINSETUP: Create CAGrantBOINCProjectRights.
- WINSETUP: Remove CACreateVBSShortcut.
- WINSETUP: Remove CAGrantServiceExecutionRight.
- WINSETUP: Remove CAMigrateCPDNBBC.
- WINSETUP: Remove CAPopulateServiceAccount.
- WINSETUP: Remove CAValidateServiceAccount.
- WINSETUP: Remove CAVerifyServiceExecutionRight.
- WINSETUP: Remove CAVerifyServicePassword.
- WINSETUP: Hookup new custom actions
NOTE: For some reason the advanced configuration screen
checkboxes are not working, so the CA's are setup to run
always to test them out.
win_build/installerv2/
BOINC.ism
win_build/installerv2/redist/Windows/src/boinccas/
CAGrantServiceExecutionRight.cpp, .h (removed)
CAMigrateCPDNBBC.cpp, .h (removed)
CAPopulateServiceAccount.cpp, .h (removed)
CAValidateServiceAccount.cpp, .h (removed)
CAVerifyServiceExecutionRight.cpp, .h (removed)
CAVerifyServicePassword.cpp, .h (removed)
CACreateBOINCUsers.cpp
CACreateBOINCGroups.cpp, .h (added)
CAGrantBOINCMasterRights.cpp, .h (added)
CAGrantBOINCProjectRights.cpp, .h (added)
svn path=/trunk/boinc/; revision=14313
2007-11-28 15:10:21 +00:00
|
|
|
#include <sddl.h>
|
2007-11-30 07:07:20 +00:00
|
|
|
#include <wincrypt.h>
|
2008-03-31 19:05:27 +00:00
|
|
|
#include <aclapi.h>
|
2007-11-30 07:07:20 +00:00
|
|
|
|
|
|
|
// CRT Header Files:
|
|
|
|
#include <time.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <errno.h>
|
2005-03-03 11:08:38 +00:00
|
|
|
|
|
|
|
// STL Header Files:
|
|
|
|
#include <cassert>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <string>
|
|
|
|
#include <iostream>
|
2007-01-05 19:36:50 +00:00
|
|
|
#include <sstream>
|
2007-02-12 21:41:48 +00:00
|
|
|
#include <vector>
|
2005-03-03 11:08:38 +00:00
|
|
|
|
2008-01-31 20:33:03 +00:00
|
|
|
// Misc Includes
|
|
|
|
#include <tchar.h>
|
|
|
|
|
2005-03-03 11:08:38 +00:00
|
|
|
#ifdef _UNICODE
|
|
|
|
#define tstring std::wstring
|
2007-01-05 19:36:50 +00:00
|
|
|
#define tostringstream std::wostringstream
|
2005-03-03 11:08:38 +00:00
|
|
|
#else
|
|
|
|
#define tstring std::string
|
2007-01-05 19:36:50 +00:00
|
|
|
#define tostringstream std::ostringstream
|
2005-03-03 11:08:38 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Define symbols not already defined in the SDK.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef STATUS_SUCCESS
|
|
|
|
#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
2006-04-13 09:06:26 +00:00
|
|
|
|