Warning about enableNumberedVersion
Added a warning that the script will not run properly if a config is enabled
This commit is contained in:
parent
849b4c31d0
commit
73bede1aeb
2 changed files with 9 additions and 3 deletions
|
@ -128,6 +128,12 @@ if ($config.options.enableForcedVersion) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($config.options.enableNumberedVersion) {
|
||||
& $PSScriptRoot\Rename.ps1
|
||||
# Check if the script is running with administrative privileges
|
||||
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
|
||||
Log-Message "Error: the config 'enableNumberedVersion' requires administrative privileges to run."
|
||||
}
|
||||
else {
|
||||
if ($config.options.enableNumberedVersion) {
|
||||
& $PSScriptRoot\Rename.ps1
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ The script reads its configuration from a JSON file named `config.json` located
|
|||
|
||||
- `enableRegularVersion`: Boolean flag to enable the downloading of the regular version of Chrome.
|
||||
- `enableForcedVersion`: Boolean flag to enable the downloading of the forced update version of Chrome.
|
||||
- `enableNumberedVersion`: Boolean flag to enable the automatic renaming of the folder to the newest version of Chrome.
|
||||
- `enableNumberedVersion`: Boolean flag to enable the automatic renaming of the folder to the newest version of Chrome **⚠️This config requires administrative privileges when executing the script!⚠️**
|
||||
- `logDateFormat`: A string defining the format of timestamps in log messages.
|
||||
|
||||
#### Date Configuration
|
||||
|
|
Loading…
Reference in a new issue