BUGFIX client windows

This commit is contained in:
2020-07-10 13:55:06 +02:00
parent 98dfc03695
commit 85892918df
3 changed files with 16 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
# Build 15. Using API 2
# Build 17. Using API 2
param([Int32]$startup=0)
#Write-Host $startup
$srcdir = $PSCommandPath | Split-Path -Parent
@@ -189,7 +189,7 @@ foreach ($CookName in $cooks){
"REMOVE" { # Remove files / folders
Remove-Item "$param" -Recurse -Force -ErrorAction Continue # They not see errors (Because error will be file not found)
}
"INSTALLMSI" { # Installs a .msi file (From $env:temp)
{$_ -in "INSTALLMSI","MSIINSTALL"} { # Installs a .msi file (From $env:temp)
Start-Process msiexec.exe -Wait -ArgumentList "/norestart /quiet /I $param" -ErrorVariable errvar
if ($? -eq $false){ # Error in MSI
$err = 1
@@ -214,6 +214,16 @@ foreach ($CookName in $cooks){
"ENDNOERROR" {
$noerror = 0
}
"IFCOMPUTERNAME" { # If Computer Name is something
$inif = $true #This controls IF start/stop
$cname = (Get-ComputerName).CSName
if ($cname -eq "$param"){
$if = $True
}else{
$if = $False
}
# True -> Exists ; False -> Not exists
}
"IFSOFTWAREINST" { # If with software
$inif = $true #This controls IF start/stop
Get-Package -Name "$param*" -ErrorAction SilentlyContinue #This will return error if program is not installed, do not see it.

View File

@@ -33,7 +33,7 @@ Note: Cooks start in directory $env:temp (%TEMP%) from SYSTEM user.
|----- |------------- |--------------------------------------------------------------------------------------------------------- |
| W | CMD | Cmd command. Beware of quotes, because internally is run as cmd /c "" |
| W/L | PWCMD | Powershell command, runs using Invoke-Command |
| W/L | REPOTOLOCAL | Copy a file from REPO folder configured to local in temp folder. You can copy a file or a folder |
| W/L | REPOTOLOCAL | Copy a file from REPO folder configured to local in temp folder. You can copy a file or a folder. Do not put between "" |
| W/L | COPY | Copy a file from copied to local (REPOTOLOCAL) to any destiantion. Ex: COPY|filec.cfg;C:\Program\filec.cfg|
| W | INSTALLMSI | Installs an MSI file silently (Params /quiet /norestart are put, do not repeat). You can add parameters (Like INSTALLMSI|superapp.msi ADDLOCAL=extension SETASDEFAULT=1) |
| W/L | NOERROR | Creates a block of instructions that not captures errors and continues event if fails<br>Example:<br>NOERROR|Try to delete a file that maybe can not exist<br>PWCMD|Remove-Item C:\Windows\loginstall.txt<br>ENDNOERROR|Finish |
@@ -64,6 +64,7 @@ Inside of a Cook, you can use a simple IF query:
| W/L | IF64BIT | When computer is running a 64 Bit operating system |
| W/L | IF32BIT | When computer is running a 32 Bit operating system |
| W/L | IFWINDOWS | When computer is running Windows |
| W/L | IFCOMPUTERNAME | When computer name is Name |
| W/L | IFLINUX | When computer is running Linux |
| L | IFBASH | When bash command returns True |
| W/L | ELSE | Else of IF... |

View File

@@ -16,7 +16,8 @@ It's not error proof, then, I don't have any responsability if something crashes
- Complete translation English and Spanish
- Stabilize all
- Support Linux clients
- Make better WebUI to replace all easygui (Password create/change and some subpages)
- Have WebUI completed
- Todo: Create Groups
# Requirements