diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4e8c966..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -7z.exe \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index f49a4e1..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/Readme.md b/Readme.md deleted file mode 100644 index e69de29..0000000 diff --git a/RegCli.psd1 b/RegCli.psd1 deleted file mode 100644 index b67ef9c..0000000 --- a/RegCli.psd1 +++ /dev/null @@ -1,26 +0,0 @@ -@{ -RootModule = 'RegCli.psm1' -ModuleVersion = '1.0.3' -GUID = '9d980765-e8a9-4dd6-b7b0-9142a7a6e704' -Author = 'Fabrice Sanga' -CompanyName = 'sangafabrice' -Copyright = '© 2022 SangaFabrice. All rights reserved.' -Description = 'Set of helper functions for updating applications.' -PowerShellVersion = '7.0' -PowerShellHostVersion = '7.0' -FunctionsToExport = 'Expand-ChromiumInstaller','Get-ExecutableType','Save-Installer', - 'Set-BatchRedirect','Set-ChromiumShortcut', - 'Set-ChromiumVisualElementsManifest' -CmdletsToExport = @() -AliasesToExport = @() -FileList = 'en-US\RegCli-help.xml','RegCli.psm1','RegCli.psd1' -PrivateData = @{ - PSData = @{ - Tags = 'Update','Chromium','RegCli' - LicenseUri = 'https://github.com/sangafabrice/reg-cli/blob/main/LICENSE.md' - ProjectUri = 'https://github.com/sangafabrice/reg-cli' - IconUri = 'https://rawcdn.githack.com/sangafabrice/reg-cli/5dd6cdfa8202fbd95eaa6fbf219f906a3b83d130/icon.png' - ReleaseNotes = 'Correct line continuation.' - } -} -} diff --git a/RegCli.psm1 b/RegCli.psm1 deleted file mode 100644 index 7dd03aa..0000000 --- a/RegCli.psm1 +++ /dev/null @@ -1,318 +0,0 @@ -#Requires -Version 7.0 -#Requires -RunAsAdministrator - -#Region RegCli class - -Enum MachineType { x64; x86 } - -Class RegCli { - # RegCli is not meant to be instantiated - # and only declares static functions - # It is a singleton - - Static [string] $AutorunDirectory = "$( - # Get the autorun directory - # where the autorun batch script is located - - (@{ - LiteralPath = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Command Processor').Autorun - ErrorAction = 'SilentlyContinue' - } | ForEach-Object { Get-Item @_ })?.Directory - )" - - Static [MachineType] $OSArchitecture = $( - # Get the OS architecture string - - If ([Environment]::Is64BitOperatingSystem) { [MachineType]::x64 } Else { [MachineType]::x86 } - ) - - Static [void] Get7Zip() { - # Download 7zip if it is absent - - "$PSScriptRoot\7z.exe".Where({ !(Test-Path $_) }) | - ForEach-Object { Start-BitsTransfer 'https://www.7-zip.org/a/7zr.exe' $_ } - } - - Static [void] ExpandInstaller($Path) { - [RegCli]::ExpandInstaller($Path, $Null) - } - - Static [void] ExpandInstaller($InstallerPath, $DestinationPath) { - # Extract files from a specified self-extracting executable - # installer $InstallerPath to $DestinationPath directory. - # Precondition : - # 1. $InstallerPath exists. - # 2. $DestinationPath may or may not exist and may be $null. - # 3. 7zip is installed. - - Get-Item -LiteralPath $InstallerPath | - ForEach-Object { - Invoke-Expression ". '$PSScriptRoot\7z.exe' x -aoa -o'$( - If ($Null -ne $DestinationPath) { $DestinationPath } - Else { "$($_.Directory)\$($_.BaseName)" } - )' '$($_.FullName)'" - } - } - - Static [void] ExpandChromiumInstaller([string] $InstallerPath, [string] $ExecutablePath) { - # Extracts files from a specified chromium installer $InstallerPath - # to the directory in which the application $ExecutablePath is located. - # Precondition : - # 1. $InstallerPath exists. - # 2. $ExecutablePath may or may not exist. - - $ExeName = $ExeBaseName = $ExeDir = $Null - ,@($ExecutablePath -split '\\') | - ForEach-Object { - $ExeName = $_[-1] - $ExeBaseName = & { - [void] ($ExeName -match '(?[^\\/]+)\.exe$') - $Matches.BaseName - } - $Count = $_.Count - $ExeDir = $(If ($Count -gt 1) { $_[0..($Count - 2)] -join '\' } Else { $PWD }) - Switch ($(Try { Get-Item -LiteralPath $InstallerPath } Catch { })) { - { $Null -ne $_ } { - [RegCli]::ExpandInstaller($_.FullName) - New-Item $ExeDir -ItemType Directory -ErrorAction SilentlyContinue - $ExeDir = (Get-Item -LiteralPath $ExeDir).FullName - $UnzipPath = "$($_.Directory)\$($_.BaseName)" - Try { - (Get-Item -LiteralPath $UnzipPath).FullName | - ForEach-Object { Push-Location $_ } - (Get-Item .\*.7z)[0].FullName | - ForEach-Object { - [RegCli]::ExpandInstaller($_) - Remove-Item $_ - } - Compress-Archive $ExeDir -DestinationPath "${Env:TEMP}\$($ExeBaseName)_$(Get-Date -Format 'yyMMddHHmm').zip" - Stop-Process -Name $($ExeBaseName) -Force -ErrorAction SilentlyContinue - Remove-Item "$ExeDir\*" -Recurse - Move-Item "$((Get-ChildItem $ExeName -Recurse).Directory)\*" $ExeDir - Pop-Location - Remove-Item $UnzipPath -Recurse - } Catch { } - } - } - } - } - - Static [void] SetChromiumVisualElementsManifest([string] $VisualElementsManifest, [string] $BackgroundColor) { - # Create the VisualElementManifest.xml in chromium app directory - - $InstallLocation = $VisualElementsManifest -replace ($VisualElementsManifest -split '\\')[-1] -replace '\\$' - $ErrorActionPreference = 'SilentlyContinue' - ,@(Get-ChildItem "$InstallLocation\*Logo.png" -Recurse) | - ForEach-Object { - $Pattern = "$InstallLocation\" -replace '\\','\\' - @{ - BigLogo = $_[0] -replace $Pattern - SmallLogo = $_[1] -replace $Pattern - } - } | - ForEach-Object { - Set-Content $VisualElementsManifest -Value @" - - - -"@ - } - } - - Static [void] SetChromiumShortcut([string] $ExecutablePath) { - # Create shortcut link to chromium app and save it to Start Menu - - (New-Object -ComObject 'WScript.Shell').CreateShortcut("${Env:ProgramData}\Microsoft\Windows\Start Menu\Programs\$( - (Get-Item -LiteralPath $ExecutablePath -ErrorAction SilentlyContinue).VersionInfo.FileDescription - ).lnk") | - ForEach-Object { - $_.TargetPath = $ExecutablePath - $_.Save() - } - } - - Static [string] DownloadInstaller([uri] $InstallerUrl) { - # Download resource and save it to %TEMP% directory - - Try { - $InstallerUrl.Segments[-1] -match '((?^.+)(?\.[^\.]+$))' - $Result = "${Env:TEMP}\$($Matches.BaseName)_$(Get-Date -Format 'yyMMddHHmm')$($Matches.Extension)" - Start-BitsTransfer -Source "$InstallerUrl" -Destination $Result - Return $Result - } - Catch { Return $Null } - } - - Static [MachineType] GetExeMachineType([string] $ExecutablePath) { - # Get the machine type of an application - - Switch ($(Try { (Get-Item -LiteralPath $ExecutablePath).FullName } Catch { })) { - { ![string]::IsNullOrEmpty($_) } { - $PEHeaderOffset = [Byte[]]::New(2) - $PESignature = [Byte[]]::New(4) - $MachineType = [Byte[]]::New(2) - $FileStream = [System.IO.FileStream]::New($_, 'Open', 'Read', 'ReadWrite') - $FileStream.Position = 0x3c - [void] $FileStream.Read($PEHeaderOffset, 0, 2) - $FileStream.Position = [System.BitConverter]::ToUInt16($PEHeaderOffset, 0) - [void] $FileStream.Read($PESignature, 0, 4) - [void] $FileStream.Read($MachineType, 0, 2) - $FileStream.Close() - Switch ([System.BitConverter]::ToUInt16($MachineType, 0)){ - 0x8664 { Return [MachineType]::x64 } - 0x14c { Return [MachineType]::x86 } - } - } - } - Return [RegCli]::OSArchitecture - } - - Static [void] SetBatchRedirect([string] $BatchName, [string] $ExecutablePath) { - # Create a batch redirect script in Autorun directory - - Try { - $ExeItem = Get-Item -LiteralPath $ExecutablePath -ErrorAction Stop - Set-Content "$( - Switch ([RegCli]::AutorunDirectory) { - { ![string]::IsNullOrEmpty($_) } { $_ } - Default { "$PWD" } - } - )\$BatchName.bat" -Value @" -@Echo OFF -If Not "%~1"=="--version" ( - If Not "%~1"=="-V" ( - Start "" /D "$($ExeItem.Directory)" "$($ExeItem.Name)" %* - GoTo :EOF - ) -) -For /F "Skip=1 Tokens=* Delims=." %%V In ('"WMIC DATAFILE WHERE Name="$($ExecutablePath -replace '\\','\\')" GET Version" 2^> Nul') Do ( - Echo %%V - GoTo :EOF -) -"@ - } - Catch { } - } -} -#EndRegion - -#Region Functions to be Exported - -# The module becomes a Facade of the singleton RegCli class -# Since the class cannot be exported with Import-Module -# Use to access the class - -Class ValidationUtility { - Static [bool] ValidateFileSystem($Path) { - Return (Get-Item -LiteralPath $Path).PSDrive.Name -iin @((Get-PSDrive -PSProvider FileSystem).Name) - } - - Static [bool] ValidatePathString($Path) { - $Pattern = '(?^.+):' - If ($Path -match $Pattern -or $PWD -match $Pattern) { - Return $Matches.Drive -iin @((Get-PSDrive -PSProvider FileSystem).Name) - } - Return $False - } - - Static [bool] ValidateSsl($Url) { Return $Url.Scheme -ieq 'https' } -} - -Function Expand-ChromiumInstaller { - [CmdletBinding(PositionalBinding=$True)] - [OutputType([System.Void])] - Param( - [Parameter(Mandatory, ValueFromPipelineByPropertyName)] - [ValidateNotNullOrEmpty()] - [ValidateScript({ [ValidationUtility]::ValidateFileSystem($_) })] - [string] $Path, - [Parameter(Mandatory)] - [ValidateNotNullOrEmpty()] - [ValidateScript({ [ValidationUtility]::ValidatePathString($_) })] - [string] $ApplicationPath - ) - [RegCli]::ExpandChromiumInstaller($Path, $ApplicationPath) -} - -Filter Get-ExecutableType { - [CmdletBinding()] - [OutputType([MachineType])] - Param( - [Parameter(Mandatory,ValueFromPipelineByPropertyName)] - [ValidateNotNullOrEmpty()] - [ValidateScript({ [ValidationUtility]::ValidatePathString($_) })] - [string] $Path - ) - [RegCli]::GetExeMachineType($Path) -} - -Filter Save-Installer { - [CmdletBinding()] - [OutputType([String])] - Param( - [Parameter(Mandatory, ValueFromPipelineByPropertyName)] - [ValidateNotNullOrEmpty()] - [ValidateScript({ [ValidationUtility]::ValidateSsl($_) })] - [uri] $Url - ) - [RegCli]::DownloadInstaller($Url) -} - -Function Set-BatchRedirect { - [CmdletBinding(PositionalBinding=$True)] - [OutputType([System.Void])] - Param( - [Parameter(Mandatory, ValueFromPipelineByPropertyName)] - [ValidateNotNullOrEmpty()] - [Alias('Name')] - [string] $BatchName, - [Parameter(Mandatory, ValueFromPipelineByPropertyName)] - [ValidateNotNullOrEmpty()] - [ValidateScript({ [ValidationUtility]::ValidateFileSystem($_) })] - [Alias('Path')] - [string] $ApplicationPath - ) - [RegCli]::SetBatchRedirect($BatchName, $ApplicationPath) -} - -Filter Set-ChromiumShortcut { - [CmdletBinding()] - [OutputType([System.Void])] - Param( - [Parameter(Mandatory, ValueFromPipelineByPropertyName)] - [ValidateNotNullOrEmpty()] - [ValidateScript({ [ValidationUtility]::ValidateFileSystem($_) })] - [string] $Path - ) - [RegCli]::SetChromiumShortcut($Path) -} - -Filter Set-ChromiumVisualElementsManifest { - [CmdletBinding(PositionalBinding=$True)] - [OutputType([System.Void])] - Param( - [Parameter(Mandatory, ValueFromPipelineByPropertyName)] - [ValidateNotNullOrEmpty()] - [ValidateScript({ [ValidationUtility]::ValidatePathString($_) })] - [string] $Path, - [AllowEmptyString()] - [AllowNull()] - [string] $BackgroundColor - ) - [RegCli]::SetChromiumVisualElementsManifest($Path, $BackgroundColor) -} - -#EndRegion - -#Region Module initialization tasks - -# Download 7zip if it is absent -[RegCli]::Get7Zip() - -#EndRegion \ No newline at end of file diff --git a/Update.ps1 b/Update.ps1 new file mode 100644 index 0000000..8994c1a --- /dev/null +++ b/Update.ps1 @@ -0,0 +1,80 @@ +[CmdletBinding()] +Param ( + [ValidateNotNullOrEmpty()] + [ValidateScript({ Test-InstallLocation $_ $PSScriptRoot })] + [string] + $InstallLocation = "${Env:ProgramData}\PotPlayer", + [ValidateNotNullOrEmpty()] + [ValidateScript({ Test-InstallerLocation $_ })] + [string] + $SaveTo = $PSScriptRoot +) + +& { + $Is64BitOS = [Environment]::Is64BitOperatingSystem + $NameLocation = "$InstallLocation\PotPlayer$(If($Is64BitOS){ '64' }).exe" + Try { + $UpdateModule = + Import-CommonScript chrome-installer | + Import-Module -PassThru -Force -Verbose:$False + @{ + UpdateInfo = $( + Write-Verbose 'Retrieve install or update information...' + Try { + Get-DownloadInfo -PropertyList @{ + OSArch = $Is64BitOS ? 'x64':'x86' + } -From PotPlayer + } + Catch { } + ) + NameLocation = $NameLocation + SaveTo = $SaveTo + SoftwareName = 'PotPlayer' + InstallerDescription = 'PotPlayer Setup File' + ForceReinstall = $True + CompareInstalls = $True + Verbose = $VerbosePreference -ine 'SilentlyContinue' + } | ForEach-Object { Invoke-CommonScript @_ } + } + Catch { } + Finally { $UpdateModule | Remove-Module -Verbose:$False } +} + +<# +.SYNOPSIS + Updates PotPlayer software. +.DESCRIPTION + The script installs or updates PotPlayer on Windows. +.NOTES + Required: at least Powershell Core 7. +.PARAMETER InstallLocation + Path to the installation directory. + It is restricted to file system paths. + It does not necessary exists. + It defaults to "%ProgramData%\PotPlayer". +.PARAMETER SaveTo + Path to the directory of the downloaded installer. + It is an existing file system path. + It defaults to the script directory. +.EXAMPLE + Get-ChildItem 'C:\ProgramData\PotPlayer' -ErrorAction SilentlyContinue + + PS > .\UpdatePotPlayer.ps1 -InstallLocation 'C:\ProgramData\PotPlayer' -SaveTo . + + PS > Get-ChildItem 'C:\ProgramData\PotPlayer' | Select-Object Name -First 5 + Name + ---- + $0 + $PLUGINSDIR + AviSynth + Extension + History + + PS > Get-ChildItem | Select-Object Name + Name + ---- + potplayer_2022.258.261.85.exe + UpdatePotPlayer.ps1 + + Install PotPlayer to 'C:\ProgramData\PotPlayer' and save its setup installer to the current directory. +#> \ No newline at end of file diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index dc3d17e..0000000 --- a/build.ps1 +++ /dev/null @@ -1,291 +0,0 @@ -$DevDependencies = @{ - PlatyPS = '0.14.2' - RemoteRepo = (git ls-remote --get-url) -replace '\.git$' - Manifest = { Invoke-Expression "$(Get-Content "$PSScriptRoot\RegCli.psd1" -Raw)" } -} - -Filter New-RCManifest { - <# - .SYNOPSIS - Create module manifest - .NOTES - Precondition: - 1. latest.json exists - #> - - $GithubRepo = $DevDependencies.RemoteRepo - $ModuleName = 'RegCli' - Push-Location $PSScriptRoot - Get-Content .\latest.json -Raw | - ConvertFrom-Json | - ForEach-Object { - @{ - Path = "$ModuleName.psd1" - RootModule = "$ModuleName.psm1" - ModuleVersion = $_.version - GUID = '9d980765-e8a9-4dd6-b7b0-9142a7a6e704' - Author = 'Fabrice Sanga' - CompanyName = 'sangafabrice' - Copyright = "© $((Get-Date).Year) SangaFabrice. All rights reserved." - Description = 'Set of helper functions for updating applications.' - PowerShellVersion = '7.0' - PowerShellHostVersion = '7.0' - FunctionsToExport = @( - (Get-Content ".\$ModuleName.psm1").Where({ $_ -like 'Function*' -or $_ -like 'Filter*' }) | - ForEach-Object { ($_ -split ' ')[1] } - ) - CmdletsToExport = @() - VariablesToExport = @() - AliasesToExport = @() - FileList = @("en-US\$ModuleName-help.xml","$ModuleName.psm1","$ModuleName.psd1") - Tags = @('Update','Chromium','RegCli') - LicenseUri = "$GithubRepo/blob/main/LICENSE.md" - ProjectUri = $GithubRepo - IconUri = 'https://rawcdn.githack.com/sangafabrice/reg-cli/5dd6cdfa8202fbd95eaa6fbf219f906a3b83d130/icon.png' - ReleaseNotes = $_.releaseNotes -join "`n" - } - } | ForEach-Object { - New-ModuleManifest @_ - (Get-Content $_.Path | - Where-Object { $_ -match '.+' } | - Where-Object { $_ -notmatch '^\s*#\.*' }) -replace ' # End of .+' -replace ", '",",'" | - Out-File "$ModuleName.psd1" - } - Pop-Location -} - -Filter New-RCMerge { - <# - .SYNOPSIS - Merge module into main - .NOTES - Precondition: - 1. The current branch is main - 2. Module files are modified in main - 3. The module manifest is modified - #> - - Param($CommitMessage) - - Push-Location $PSScriptRoot - Try { - If ((git branch --show-current) -ne 'main') { Throw 'BranchNotMain' } - New-RCManifest - $Manifest = & $DevDependencies.Manifest - $FileList = $Manifest.FileList - $ManifestFile = $FileList | Where-Object {$_ -like '*.psd1'} - Test-ModuleManifest $ManifestFile - If ($Null -eq $CommitMessage) { - $CommitMessage = Switch ($Manifest.PrivateData.PSData.ReleaseNotes) { - { ($_ -split "`n").Count -eq 1 } { "$_" } - Default { "RELEASE: v$($Manifest.ModuleVersion)" } - } - } - $GitDiffFiles = @(git diff --name-only --cached) + @(git diff --name-only) - If ($GitDiffFiles.Count -eq 0) { Throw } - ,($GitDiffFiles | Select-Object -Unique) | - ForEach-Object { - If ($_.Count -eq $_.Where({$_ -in $FileList}, 'Until').Count) { Throw 'ModuleFilesNotModified' } - If ($Null -eq ($_ | Where-Object { $_ -eq $ManifestFile })) { Throw 'ModuleManifestNotModified' } - } - Invoke-Expression "git add $($FileList) latest.json Readme.md" - git commit --message "$CommitMessage" --quiet - git stash push --include-untracked --quiet - git switch module --quiet 2> $Null - If (!$?) { - git stash pop --quiet > $Null 2>&1 - Throw - } - git merge --no-commit main > $Null 2>&1 - $IsMergeError = !$? - $CDPattern = "$($PWD -replace '\\','\\')\\" - Get-ChildItem -Recurse -File | - Where-Object { ($_.FullName -replace $CDPattern) -inotin $FileList } | - Remove-Item - Get-ChildItem -Directory | - Where-Object { ($_.FullName -replace $CDPattern) -inotin @($FileList | - Where-Object { $_ -like '*\*' } | - ForEach-Object { ($_ -split '\\')[0] }) } | - Remove-Item -Recurse -Force - If ($IsMergeError) { - ,@(git diff --name-only) | - ForEach-Object { If ($_ -in $FileList) { Throw 'MergeConflict' } } - git add . - } - git commit --message "$CommitMessage" --quiet - git switch main --quiet 2> $Null - git stash pop --quiet > $Null 2>&1 - } - Catch { "ERROR: $($_.Exception.Message)" } - Pop-Location -} - -Filter Invoke-OnModuleBranch { - <# - .SYNOPSIS - Process a scriptblock on module branch - .NOTES - Precondition: - 1. The current branch does not have unstaged changes. - 2. The script block does not modify module - #> - - Param([Parameter(Mandatory=$true)] $ScriptBlock) - - Get-Module RegCli -ListAvailable | - ForEach-Object { - Push-Location $PSScriptRoot - git branch --show-current | - ForEach-Object { - Try { - git switch module --quiet 2> $Null - If (!$?) { Throw "StayOn_$_" } - git switch $_ --quiet 2> $Null - git stash push --include-untracked --quiet - git switch module --quiet - & $ScriptBlock - } - Catch { "ERROR: $($_.Exception.Message)" } - Finally { - git switch $_ --quiet 2> $Null - git stash pop --quiet > $Null 2>&1 - } - } - Pop-Location - } -} - -## TODO: Function must implement -WhatIf -Filter Publish-RCModule { - <# - .SYNOPSIS - Publish module to PSGallery - .NOTES - Precondition: - 1. The current branch is module - 2. The NUGET_API_KEY environment variable is set. - #> - - Invoke-OnModuleBranch { - If ((git branch --show-current) -ne 'module') { Throw 'BranchNotPwshModule' } - If ($null -eq $Env:NUGET_API_KEY) { Throw 'NUGET_API_KEY_IsNull' } - @{ - Name = 'RegCli'; - NuGetApiKey = $Env:NUGET_API_KEY; - } | ForEach-Object { Publish-Module @_ } - Write-Host "RegCli@v$((& $DevDependencies.Manifest).ModuleVersion) published" - } -} - -## TODO: Function must implement -WhatIf -Filter Push-RCModule { - <# - .SYNOPSIS - Push new module commit to GitHub - .NOTES - Precondition: - 1. The current branch is module - .OUTPUTS - Push details - #> - - Invoke-OnModuleBranch { - If ((git branch --show-current) -ne 'module') { Throw 'BranchNotPwhModule' } - git push origin module --force - If (!$?) { Throw 'PushModuleToGitHubFailed' } - "v$((& $DevDependencies.Manifest).ModuleVersion)" | - ForEach-Object { - If ($_ -inotin @(git tag --list)) { - git tag $_ - git push --tags - } - } - } -} - -Filter Deploy-RCModule { - <# - .SYNOPSIS - Deploy module Everywhere - #> - - Try { - { If ((git branch --show-current) -ne 'main') { Throw 'BranchNotMain' } } | - ForEach-Object { - & $_ - New-RCMerge - & $_ - } - Push-RCModule - Publish-RCModule - } - Catch { "ERROR: $($_.Exception.Message)" } -} - -Function Update-RCHelp { - <# - .SYNOPSIS - Update RegCli help document - .NOTES - Precondition: PlatyPS is installed - #> - - Begin { - $PlatyPsModule = Get-Module | Where-Object Name -eq 'PlatyPS' - Import-Module PlatyPS -RequiredVersion $DevDependencies.PlatyPS -Force - } - Process { - Push-Location $PSScriptRoot - New-ExternalHelp -Path .\en_us\ -OutputPath en-US -Force - Pop-Location - } - End { - Remove-Module PlatyPS -Force - If ($PlatyPsModule.Count -gt 0) { - Import-Module PlatyPS -RequiredVersion $PlatyPsModule.Version -Force - } - } -} - -Filter Install-BuildDependencies { - <# - .SYNOPSIS - Install build modules - #> - - { - Param( - $Name, - $PreInstall - ) - - If ((Get-Module $Name -ListAvailable | - Where-Object Version -eq $DevDependencies[$Name]).Count -eq 0) { - If ($Null -ne $PreInstall) { & $PreInstall } - Install-Module $Name -RequiredVersion $DevDependencies[$Name] -Force - } - } | ForEach-Object { & $_ PlatyPS } -} - -Filter New-RCJunction { - <# - .SYNOPSIS - Create the RegCli Junction in PSModulePath - #> - - Param([switch] $Force) - - $FirstPath = "$(($env:PSModulePath -split ';')[0])\RegCli" - If (Test-Path $FirstPath) { - If ($Force) { - Remove-Item $FirstPath -Force - } Else { - Return 'RegCli junction already exists' - } - } - @{ - Path = $FirstPath; - ItemType = 'Junction'; - Value = $PSScriptRoot - } | ForEach-Object { New-Item @_ } -} \ No newline at end of file diff --git a/dist b/dist new file mode 100644 index 0000000..486c093 --- /dev/null +++ b/dist @@ -0,0 +1,8 @@ +$DevDependencies = @{ + ProgramName = 'PotPlayer' + Description = 'The script installs or updates PotPlayer media player on Windows.' + Guid = '0dff32be-6c4b-4ede-91c2-6908bbc34822' + IconUri = 'https://rawcdn.githack.com/sangafabrice/reg-cli/995542bc7beec6b5d2849a9c819298c5b2437f29/icon.png' + Tags = @('potplayer','nsis','update','media-player') + RemoteRepo = (git ls-remote --get-url) -replace '\.git$' +} \ No newline at end of file diff --git a/en-US/RegCli-help.xml b/en-US/RegCli-help.xml deleted file mode 100644 index de083cb..0000000 --- a/en-US/RegCli-help.xml +++ /dev/null @@ -1,557 +0,0 @@ - - - - - Expand-ChromiumInstaller - Expand - ChromiumInstaller - - Extracts files from a specified chromium installer (exe) file. - - - - The Expand-ChromiumInstaller extracts files from a specified executable chromium installer file to the directory in which the application is located (ApplicationPath). - - - - Expand-ChromiumInstaller - - Path - - Path to chromium installer. - - String - - String - - - None - - - ApplicationPath - - Path to chromium application executable. - - String - - String - - - None - - - - - - ApplicationPath - - Path to chromium application executable. - - String - - String - - - None - - - Path - - Path to chromium installer. - - String - - String - - - None - - - - - - System.String - - - - - - - - - - System.Void - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Expand-ChromiumInstaller 'C:\chrome_installer.exe' 'C:\ProgramData\GoogleChrome\chrome.exe' - - This command installs Google Chrome to 'C:\ProgramData\GoogleChrome'. - - - - - - - - Get-ExecutableType - Get - ExecutableType - - Gets the machine type of a binary file. - - - - The Get-ExecutableType function gets the machine type of a binary file. When the file does not exist, the function returns the architecture of the Operating System. - - - - Get-ExecutableType - - Path - - Path to the binary file. - - String - - String - - - None - - - - - - Path - - Path to the binary file. - - String - - String - - - None - - - - - - System.String - - - - - - - - - - MachineType - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> [Environment]::Is64BitOperatingSystem -True - -PS C:\> Get-ExecutableType 'C:\GoogleChrome\chrome.exe' -x86 - -PS C:\> Remove-Item 'C:\GoogleChrome\chrome.exe' -PS C:\> Get-ExecutableType 'C:\GoogleChrome\chrome.exe' -x64 - - Get the machine type of chrome application. - - - - - - - - Save-Installer - Save - Installer - - Downloads a specified installer. - - - - The Save-Installer function downloads a specified installer to the %TEMP% directory and appends timestamp to the installer base name. The URL must be secured. - - - - Save-Installer - - Url - - Url of the installer to download. - - Uri - - Uri - - - None - - - - - - Url - - Url of the installer to download. - - Uri - - Uri - - - None - - - - - - System.Uri - - - - - - - - - - System.String - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Save-Installer 'https://github.com/ytdl-org/youtube-dl/releases/download/2021.12.17/youtube-dl.exe' - - The command downloads youtube-dl.exe. - - - - - - - - Set-BatchRedirect - Set - BatchRedirect - - Set the content of the batch redirect to a specified application. - - - - - - - - Set-BatchRedirect - - BatchName - - Name of the batch redirect file. - - String - - String - - - None - - - ApplicationPath - - Path to the chromium executable. - - String - - String - - - None - - - - - - ApplicationPath - - Path to the chromium executable. - - String - - String - - - None - - - BatchName - - Name of the batch redirect file. - - String - - String - - - None - - - - - - System.String - - - - - - - - - - System.Void - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Set-BatchRedirect chrome 'C:\GoogleChrome\chrome.exe' - - - - - - - - - - Set-ChromiumShortcut - Set - ChromiumShortcut - - Save a specified chromium application shortcut to Start Menu. - - - - - - - - Set-ChromiumShortcut - - Path - - Path to the chromium executable. - - String - - String - - - None - - - - - - Path - - Path to the chromium executable. - - String - - String - - - None - - - - - - System.String - - - - - - - - - - System.Void - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Set-ChromiumShortcut "C:\Secure\AvastBrowser.exe" - - - - - - - - - - Set-ChromiumVisualElementsManifest - Set - ChromiumVisualElementsManifest - - Sets the content of the VisualElementsManifest.xml file. - - - - - - - - Set-ChromiumVisualElementsManifest - - Path - - Path to VisualElementsManifest.xml - - String - - String - - - None - - - BackgroundColor - - Hexadecimal color code. - - String - - String - - - None - - - - - - BackgroundColor - - Hexadecimal color code. - - String - - String - - - None - - - Path - - Path to VisualElementsManifest.xml - - String - - String - - - None - - - - - - System.String - - - - - - - - - - System.Void - - - - - - - - - - - - - - -------------------------- Example 1 -------------------------- - PS C:\> Set-ChromiumVisualElementsManifest 'C:\Secure\AvastBrowser.VisualElementsManifest.xml' '#2D364C' - - - - - - - - \ No newline at end of file diff --git a/en_us/Expand-ChromiumInstaller.md b/en_us/Expand-ChromiumInstaller.md deleted file mode 100644 index 7694ea9..0000000 --- a/en_us/Expand-ChromiumInstaller.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -external help file: RegCli-help.xml -Module Name: RegCli -online version: -schema: 2.0.0 ---- - -# Expand-ChromiumInstaller - -## SYNOPSIS -Extracts files from a specified chromium installer (exe) file. - -## SYNTAX - -``` -Expand-ChromiumInstaller [-Path] [-ApplicationPath] [] -``` - -## DESCRIPTION -The Expand-ChromiumInstaller extracts files from a specified executable chromium installer file to the directory in which the application is located (ApplicationPath). - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> Expand-ChromiumInstaller 'C:\chrome_installer.exe' 'C:\ProgramData\GoogleChrome\chrome.exe' -``` - -This command installs Google Chrome to 'C:\ProgramData\GoogleChrome'. - -## PARAMETERS - -### -ApplicationPath -Path to chromium application executable. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path -Path to chromium installer. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String - -## OUTPUTS - -### System.Void - -## NOTES - -## RELATED LINKS diff --git a/en_us/Get-ExecutableType.md b/en_us/Get-ExecutableType.md deleted file mode 100644 index d34eb2b..0000000 --- a/en_us/Get-ExecutableType.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -external help file: RegCli-help.xml -Module Name: RegCli -online version: -schema: 2.0.0 ---- - -# Get-ExecutableType - -## SYNOPSIS -Gets the machine type of a binary file. - -## SYNTAX - -``` -Get-ExecutableType [-Path] [] -``` - -## DESCRIPTION -The Get-ExecutableType function gets the machine type of a binary file. When the file does not exist, the function returns the architecture of the Operating System. - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> [Environment]::Is64BitOperatingSystem -True - -PS C:\> Get-ExecutableType 'C:\GoogleChrome\chrome.exe' -x86 - -PS C:\> Remove-Item 'C:\GoogleChrome\chrome.exe' -PS C:\> Get-ExecutableType 'C:\GoogleChrome\chrome.exe' -x64 -``` - -Get the machine type of chrome application. - -## PARAMETERS - -### -Path -Path to the binary file. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String - -## OUTPUTS - -### MachineType - -## NOTES - -## RELATED LINKS diff --git a/en_us/RegCli.md b/en_us/RegCli.md deleted file mode 100644 index b272605..0000000 --- a/en_us/RegCli.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -Module Name: RegCli -Module Guid: 9d980765-e8a9-4dd6-b7b0-9142a7a6e704 -Download Help Link: -Help Version: 1.0.0.0 -Locale: en-US ---- - -# RegCli Module -## Description -Set of helper functions for updating applications. - -## RegCli Cmdlets -### [Expand-ChromiumInstaller](Expand-ChromiumInstaller.md) -Extracts files from a specified chromium installer (exe) file. - -### [Set-BatchRedirect](Set-BatchRedirect.md) -Set the content of the batch redirect to a specified application. - -### [Get-ExecutableType](Get-ExecutableType.md) -Gets the machine type of a binary file. - -### [Save-Installer](Save-Installer.md) -Downloads a specified installer. - -### [Set-ChromiumShortcut](Set-ChromiumShortcut.md) -Save a specified chromium application shortcut to Start Menu. - -### [Set-ChromiumVisualElementsManifest](Set-ChromiumVisualElementsManifest.md) -Sets the content of the VisualElementsManifest.xml file. - diff --git a/en_us/Save-Installer.md b/en_us/Save-Installer.md deleted file mode 100644 index f887571..0000000 --- a/en_us/Save-Installer.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -external help file: RegCli-help.xml -Module Name: RegCli -online version: -schema: 2.0.0 ---- - -# Save-Installer - -## SYNOPSIS -Downloads a specified installer. - -## SYNTAX - -``` -Save-Installer [-Url] [] -``` - -## DESCRIPTION -The Save-Installer function downloads a specified installer to the %TEMP% directory and appends timestamp to the installer base name. The URL must be secured. - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> Save-Installer 'https://github.com/ytdl-org/youtube-dl/releases/download/2021.12.17/youtube-dl.exe' -``` - -The command downloads youtube-dl.exe. - -## PARAMETERS - -### -Url -Url of the installer to download. - -```yaml -Type: Uri -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.Uri - -## OUTPUTS - -### System.String - -## NOTES - -## RELATED LINKS diff --git a/en_us/Set-BatchRedirect.md b/en_us/Set-BatchRedirect.md deleted file mode 100644 index 9f2c0de..0000000 --- a/en_us/Set-BatchRedirect.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -external help file: RegCli-help.xml -Module Name: RegCli -online version: -schema: 2.0.0 ---- - -# Set-BatchRedirect - -## SYNOPSIS -Set the content of the batch redirect to a specified application. - -## SYNTAX - -``` -Set-BatchRedirect [-BatchName] [-ApplicationPath] [] -``` - -## DESCRIPTION - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> Set-BatchRedirect chrome 'C:\GoogleChrome\chrome.exe' -``` - -## PARAMETERS - -### -ApplicationPath -Path to the chromium executable. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: Path - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -BatchName -Name of the batch redirect file. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: Name - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String - -## OUTPUTS - -### System.Void - -## NOTES - -## RELATED LINKS diff --git a/en_us/Set-ChromiumShortcut.md b/en_us/Set-ChromiumShortcut.md deleted file mode 100644 index 3413add..0000000 --- a/en_us/Set-ChromiumShortcut.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -external help file: RegCli-help.xml -Module Name: RegCli -online version: -schema: 2.0.0 ---- - -# Set-ChromiumShortcut - -## SYNOPSIS -Save a specified chromium application shortcut to Start Menu. - -## SYNTAX - -``` -Set-ChromiumShortcut [-Path] [] -``` - -## DESCRIPTION - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> Set-ChromiumShortcut "C:\Secure\AvastBrowser.exe" -``` - -## PARAMETERS - -### -Path -Path to the chromium executable. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String - -## OUTPUTS - -### System.Void - -## NOTES - -## RELATED LINKS diff --git a/en_us/Set-ChromiumVisualElementsManifest.md b/en_us/Set-ChromiumVisualElementsManifest.md deleted file mode 100644 index 7e4ba9e..0000000 --- a/en_us/Set-ChromiumVisualElementsManifest.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -external help file: RegCli-help.xml -Module Name: RegCli -online version: -schema: 2.0.0 ---- - -# Set-ChromiumVisualElementsManifest - -## SYNOPSIS -Sets the content of the VisualElementsManifest.xml file. - -## SYNTAX - -``` -Set-ChromiumVisualElementsManifest [-Path] [[-BackgroundColor] ] [] -``` - -## DESCRIPTION - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> Set-ChromiumVisualElementsManifest 'C:\Secure\AvastBrowser.VisualElementsManifest.xml' '#2D364C' -``` - -## PARAMETERS - -### -BackgroundColor -Hexadecimal color code. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path -Path to VisualElementsManifest.xml - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String - -## OUTPUTS - -### System.Void - -## NOTES - -## RELATED LINKS diff --git a/icon.png b/icon.png index 1c2ac1a..5dbd373 100644 Binary files a/icon.png and b/icon.png differ diff --git a/latest.json b/latest.json index dad028f..5484e9f 100644 --- a/latest.json +++ b/latest.json @@ -1,6 +1,6 @@ { - "version": "1.0.3", + "version": "0.0.1", "releaseNotes": [ - "Correct line continuation." + "Initialize PotPlayer updater script." ] } \ No newline at end of file