mirror of
https://gitlab.com/JKANetwork/powerfulcomputermanager.git
synced 2026-03-03 00:56:45 +01:00
BUGFIX client windows
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user