From aa8191970f6bcdbdbc327c16cb0048581b7c2c8c Mon Sep 17 00:00:00 2001 From: Bill Stewart Date: Fri, 29 Jan 2021 14:39:21 -0700 Subject: [PATCH] v1.0.1 --- EditPath.iss | 2 +- EditPath.rc | 8 ++++---- PathMgr.pp | 1 + PathMgr.ps1 | 2 +- PathMgr.rc | 8 ++++---- history.md | 11 +++++++++++ 6 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 history.md diff --git a/EditPath.iss b/EditPath.iss index 8cb8551..7196989 100644 --- a/EditPath.iss +++ b/EditPath.iss @@ -27,7 +27,7 @@ ; * At uninstall, removes dir from Path if custom setting present ; * Unloads and deletes DLL and removes app dir at uninstall deinitialize -#if ComparePackedVersion(Ver, 6) < 0 +#if Ver < EncodeVer(6,0,0,0) #error This script requires Inno Setup 6 or later #endif diff --git a/EditPath.rc b/EditPath.rc index 1983cbf..1a07a17 100644 --- a/EditPath.rc +++ b/EditPath.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO -FILEVERSION 4,0,0,0 -PRODUCTVERSION 4,0,0,0 +FILEVERSION 4,0,1,0 +PRODUCTVERSION 4,0,1,0 FILEOS 0x4 FILETYPE 1 { @@ -10,12 +10,12 @@ FILETYPE 1 { VALUE "CompanyName", "" VALUE "FileDescription", "EditPath.exe" - VALUE "FileVersion", "4.0.0.0" + VALUE "FileVersion", "4.0.1.0" VALUE "InternalName", "EditPath.exe" VALUE "LegalCopyright", "Copyright 2021 by Bill Stewart (bstewart at iname.com)" VALUE "OriginalFilename", "EditPath.exe" VALUE "ProductName", "" - VALUE "ProductVersion", "4.0.0.0" + VALUE "ProductVersion", "4.0.1.0" } } diff --git a/PathMgr.pp b/PathMgr.pp index 88e71d9..88af5f8 100644 --- a/PathMgr.pp +++ b/PathMgr.pp @@ -59,6 +59,7 @@ function IsDirInPath(const DirName: pwidechar; const PathType: DWORD; FindType: var PathFindType: TPathFindType; begin + if PathType > 1 then exit(ERROR_INVALID_PARAMETER); result := wsIsDirInPath(DirName, TPathType(PathType), PathFindType); FindType^ := DWORD(PathFindType); end; diff --git a/PathMgr.ps1 b/PathMgr.ps1 index 5b5bd58..e06a101 100644 --- a/PathMgr.ps1 +++ b/PathMgr.ps1 @@ -152,7 +152,7 @@ function IsDirInPath { $intPathType = GetSystemOrUser $pathType $findType = $null $result = $PathMgr::IsDirInPath($dirName,$intPathType,[Ref] $findType) - if ( ($result -eq 0) ) { + if ( $result -eq 0 ) { $result = $findType } $result diff --git a/PathMgr.rc b/PathMgr.rc index 8f1726f..f6b6e68 100644 --- a/PathMgr.rc +++ b/PathMgr.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO -FILEVERSION 1,0,0,0 -PRODUCTVERSION 1,0,0,0 +FILEVERSION 1,0,1,0 +PRODUCTVERSION 1,0,1,0 FILEOS 0x4 FILETYPE 1 { @@ -10,12 +10,12 @@ FILETYPE 1 { VALUE "CompanyName", "" VALUE "FileDescription", "PathMgr.dll" - VALUE "FileVersion", "1.0.0.0" + VALUE "FileVersion", "1.0.1.0" VALUE "InternalName", "PathMgr.dll" VALUE "LegalCopyright", "Copyright 2021 by Bill Stewart (bstewart at iname.com)" VALUE "OriginalFilename", "PathMgr.dll" VALUE "ProductName", "" - VALUE "ProductVersion", "1.0.0.0" + VALUE "ProductVersion", "1.0.1.0" } } diff --git a/history.md b/history.md new file mode 100644 index 0000000..10a01ec --- /dev/null +++ b/history.md @@ -0,0 +1,11 @@ +# PathMgr.dll Version History + +## 1.0.1 (29 Jan 2021) + +* Fix: Validate `PathType` parameter for `IsDirInPath()` function. + +* Fix: Corrected version check for Inno Setup sample script (thanks to Martijn Laan). + +## 1.0.0 (27 Jan 2021) + +* Initial version. \ No newline at end of file