mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-03 11:02:11 +08:00
fixing windows
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user