Changes to doc and to API, a bit more stable

This commit is contained in:
2019-10-31 11:35:16 +01:00
parent ea9f7b6436
commit 9de38014be
6 changed files with 71 additions and 23 deletions

View File

@@ -1,10 +1,10 @@
# Build 8
# Build 9
param([Int32]$startup=0)
Write-Host $startup
$root = $PSCommandPath | Split-Path -Parent
$server = (Get-Content "$root\configpcm.ini" | select -Skip 1 | ConvertFrom-StringData).server
$resources = (Get-Content "$root\configpcm.ini" | select -Skip 1 | ConvertFrom-StringData).resources
$64bit = [Environment]::Is64BitOperatingSystem
$computerName = [System.Net.Dns]::GetHostName()
$UUID=(get-wmiobject Win32_ComputerSystemProduct).UUID
@@ -51,6 +51,14 @@ foreach ($CookName in $cooks){
Write-Host "Se salta ya que no esta arrancando/apagandose el equipo..."
continue # Go for next
}
if ($cook.only64bit -eq 1 -and $64bit -eq $false) { # If script is only for 64 bit and system is 32 bit..
Write-Host "Se salta ya que es esta receta es solo para 64 bits..."
continue # Go for next
}
if ($cook.only32bit -eq 1 -and $64bit -eq $true) { # If script is only for 32 bit and system is 64 bit..
Write-Host "Se salta ya que es esta receta es solo para 32 bits..."
continue # Go for next
}
$err = 0
$exit = 0
$inif = $false
@@ -182,6 +190,12 @@ foreach ($CookName in $cooks){
Invoke-Expression $param #Executes powershell command
$if=$? # True -> Exists ; False -> Not exists
}
"IF64BIT" { # If 64 bit computer
$if = $64bit # Its true if 64 bit computer
}
"IF32BIT" { # If 32 bit computer
$if = !$64bit # Its true if 32 bit computer, flipped boolean
}
"ELSE" { # Turn bool $if
$if = !$if
}