Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
updated to newest build toolset
  • Loading branch information
jformacek committed Jan 25, 2023
1 parent 1461172 commit 4c63a98
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 56 deletions.
6 changes: 4 additions & 2 deletions Main/AdmPwd.PS/AdmPwd.PS.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AdmPwd.PS</RootNamespace>
<AssemblyName>AdmPwd.PS</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -29,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,35 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
Expand Down
8 changes: 6 additions & 2 deletions Main/AdmPwd.UI/AdmPwd.UI.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AdmPwd.UI</RootNamespace>
<AssemblyName>AdmPwd.UI</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -30,6 +32,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\Solution Items\app.ico</ApplicationIcon>
Expand Down Expand Up @@ -73,6 +76,7 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
2 changes: 1 addition & 1 deletion Main/AdmPwd.UI/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 10 additions & 14 deletions Main/AdmPwd.UI/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Main/AdmPwd.UI/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
7 changes: 5 additions & 2 deletions Main/AdmPwd.Utils/AdmPwd.Utils.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AdmPwd.Utils</RootNamespace>
<AssemblyName>AdmPwd.Utils</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
12 changes: 6 additions & 6 deletions Main/AdmPwd/AdmPwd.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,34 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
10 changes: 5 additions & 5 deletions Main/AdmPwd/Config.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "stdafx.h"
#include "Config.h"

Config::Config()
Config::Config() noexcept
{
DWORD data;
HKEY hPolicyKey = 0;
Expand Down Expand Up @@ -37,11 +37,11 @@ Config::Config()
if (_pwdLength > MAX_PWD_LENGTH || _pwdLength < MIN_PWD_LENGTH)
_pwdLength = PWD_LENGTH;

GetRegistryDWORD(hPolicyKey, PWD_COMPLEXITY_REG_VALUE, &_pwdComplexity);
if (_pwdLength > MAX_PWD_LENGTH || _pwdLength < PWD_LENGTH)
_pwdLength = PWD_LENGTH;

GetRegistryDWORD(hPolicyKey, PWD_AGE_REG_VALUE, &_pwdAge);
if (_pwdAge > MAX_PWD_AGE_DAYS)
_pwdAge = MAX_PWD_AGE_DAYS;

GetRegistryDWORD(hPolicyKey, PWD_COMPLEXITY_REG_VALUE, &_pwdAge);
if (_pwdComplexity < MIN_PWD_COMPLEXITY || _pwdComplexity > MAX_PWD_COMPLEXITY)
_pwdComplexity = MAX_PWD_COMPLEXITY;

Expand Down
25 changes: 14 additions & 11 deletions Main/AdmPwd/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,22 @@ enum {
#define PWD_EXPIRATION_PROTECTION_ENABLED_REG_VALUE L"PwdExpirationProtectionEnabled"

//Password quality and duration parameters
#define MAX_PWD_COMPLEXITY 4 //default
//default pwd complexity
#define MAX_PWD_COMPLEXITY 4
#define MIN_PWD_COMPLEXITY 1
#define MIN_PWD_LENGTH 8
#define PWD_LENGTH 12 //default
//default pwd length
#define PWD_LENGTH 12
#define MAX_PWD_LENGTH 64
#define PWD_AGE_DAYS 30 //default
//default pwd age
#define PWD_AGE_DAYS 30
#define MAX_PWD_AGE_DAYS 365
#define MIN_PWD_AGE_DAYS 1

class Config
{
public:
Config();
Config() noexcept;
~Config();

//password complexity
Expand All @@ -62,25 +65,25 @@ class Config
__declspec(property(get = GET_PasswordExpirationProtectionRequired)) bool PasswordExpirationProtectionRequired;

//accessors
DWORD GET_PasswordComplexity() {
DWORD GET_PasswordComplexity() noexcept {
return _pwdComplexity;
};
bool GET_AccountManagementEnabled() {
bool GET_AccountManagementEnabled() noexcept {
return _AccountManagementEnabled;
};
DWORD GET_PasswordLength() {
DWORD GET_PasswordLength() noexcept {
return _pwdLength;
};
DWORD GET_PasswordAge() {
DWORD GET_PasswordAge() noexcept {
return _pwdAge;
};
DWORD GET_LogLevel() {
DWORD GET_LogLevel() noexcept {
return _logLevel;
};
TCHAR* GET_AdminAccountName() {
TCHAR* GET_AdminAccountName() noexcept {
return _adminName;
};
bool GET_PasswordExpirationProtectionRequired() {
bool GET_PasswordExpirationProtectionRequired() noexcept {
return _pwdExpirationProtectionRequired;
};

Expand Down
4 changes: 2 additions & 2 deletions Main/Solution Items/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("6.3.1.0")]
[assembly: AssemblyFileVersion("6.3.1.0")]
[assembly: AssemblyVersion("6.3.2.0")]
[assembly: AssemblyFileVersion("6.3.2.0")]

[assembly: AssemblyCompany("")]
[assembly: AssemblyCopyright("")]
Expand Down
10 changes: 5 additions & 5 deletions Main/Solution Items/Version.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#define FILEVER 6,3,1,0
#define PRODUCTVER 6,3,1,0
#define FILEVER 6,3,2,0
#define PRODUCTVER 6,3,2,0

#define FileVersion "6.3.1.0"
#define ProductVersion "6.3.1.0"
#define FileVersion "6.3.2.0"
#define ProductVersion "6.3.2.0"

#define COMPANYNAME "GreyCorbel Solutions"
#define COPYRIGHT "Copyright (C) 2016 - 2019 Jiri Formacek, GreyCorbel Solutions"
#define COPYRIGHT "Copyright (C) 2016 - 2023 Jiri Formacek, GreyCorbel Solutions"
#define PRODUCT "AdmPwd"

0 comments on commit 4c63a98

Please sign in to comment.