Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts
This commit is contained in:
commit
3844492976
|
@ -5,7 +5,7 @@
|
||||||
{
|
{
|
||||||
"custom": null,
|
"custom": null,
|
||||||
"System": [
|
"System": [
|
||||||
"Windows"
|
"Desktop"
|
||||||
],
|
],
|
||||||
"Hostname": null,
|
"Hostname": null,
|
||||||
"Username": null,
|
"Username": null,
|
||||||
|
|
|
@ -44,7 +44,8 @@
|
||||||
|
|
||||||
$possibleValues
|
$possibleValues
|
||||||
})]
|
})]
|
||||||
[string[]]$ScriptName
|
[string[]]$ScriptName,
|
||||||
|
[switch]$WaitNotRequired = $env:WAIT_NOT_REQUIRED
|
||||||
)
|
)
|
||||||
|
|
||||||
$local:EditRootPath=$MyPSScriptRoot
|
$local:EditRootPath=$MyPSScriptRoot
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Packagesz { #: System.Management.Automation.IValidateSetValuesGenerator {
|
||||||
$local:valid = $Package.Condition[0].Logic -notin ([szLogic]::or, [szLogic]::ornot)
|
$local:valid = $Package.Condition[0].Logic -notin ([szLogic]::or, [szLogic]::ornot)
|
||||||
$local:currentSys = [SystemName]::_GetValidValues('',$true,$true);
|
$local:currentSys = [SystemName]::_GetValidValues('',$true,$true);
|
||||||
$local:hostname = $(hostname)
|
$local:hostname = $(hostname)
|
||||||
$local:username = $env:USER ?? $env:USERNAME
|
$local:username = $( if( $env:USER ) { $env:USER } else { $env:USERNAME })
|
||||||
foreach( $local:c in $Package.Condition ) {
|
foreach( $local:c in $Package.Condition ) {
|
||||||
if( $valid -eq ($c.Logic -in ([szLogic]::or, [szLogic]::ornot )) ) { continue }
|
if( $valid -eq ($c.Logic -in ([szLogic]::or, [szLogic]::ornot )) ) { continue }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue