fixing windows

This commit is contained in:
afeiszli
2021-11-17 21:57:27 -05:00
parent 20a939b188
commit ccbd6f90f7
8 changed files with 162 additions and 48 deletions

View File

@@ -24,6 +24,11 @@ new-module -name netclient-install -scriptblock {
Invoke-WebRequest -Uri $url -OutFile $outpath
$args = @("Comma","Separated","Arguments")
$procWG = Start-Process -Filepath "$env:userprofile\Downloads\wireguard-installer.exe" -ArgumentList $args
if ($procWG -eq $null) {}
Start-Sleep -Seconds 5
} else {
$procWG.WaitForExit()
}
$procWG.WaitForExit()
Start-Sleep -Seconds 5
$software = "WireGuard";
@@ -48,7 +53,11 @@ new-module -name netclient-install -scriptblock {
}
$NetArgs = @("join","-t",$token)
$procNC = Start-Process -Filepath $outpath -ArgumentList $NetArgs
$procNC.WaitForExit()
if ($procNC -eq $null) {}
Start-Sleep -Seconds 5
} else {
$procNC.WaitForExit()
}
Add-MpPreference -ExclusionPath "C:\ProgramData\Netclient"
if ((Get-Command "netclient.exe" -ErrorAction SilentlyContinue) -eq $null) {