Browse Source

fixing windows

afeiszli 3 years ago
parent
commit
d4001f6a4d
2 changed files with 4 additions and 2 deletions
  1. BIN
      netclient/netclient.syso
  2. 4 2
      scripts/netclient-install.ps1

BIN
netclient/netclient.syso


+ 4 - 2
scripts/netclient-install.ps1

@@ -1,4 +1,6 @@
 new-module -name netclient-install -scriptblock {
 new-module -name netclient-install -scriptblock {
+    $ErrorActionPreference = "Stop"
+
     function Quit {
     function Quit {
         param(
         param(
             $Text
             $Text
@@ -24,7 +26,7 @@ new-module -name netclient-install -scriptblock {
         Invoke-WebRequest -Uri $url -OutFile $outpath
         Invoke-WebRequest -Uri $url -OutFile $outpath
         $args = @("Comma","Separated","Arguments")
         $args = @("Comma","Separated","Arguments")
         $procWG = Start-Process -Filepath "$env:userprofile\Downloads\wireguard-installer.exe" -ArgumentList $args
         $procWG = Start-Process -Filepath "$env:userprofile\Downloads\wireguard-installer.exe" -ArgumentList $args
-        if ($procWG -eq $null) {}
+        if ($procWG -eq $null) {
             Start-Sleep -Seconds 5
             Start-Sleep -Seconds 5
         } else {
         } else {
             $procWG.WaitForExit() 
             $procWG.WaitForExit() 
@@ -53,7 +55,7 @@ new-module -name netclient-install -scriptblock {
     }
     }
     $NetArgs = @("join","-t",$token)
     $NetArgs = @("join","-t",$token)
     $procNC = Start-Process -Filepath $outpath -ArgumentList $NetArgs
     $procNC = Start-Process -Filepath $outpath -ArgumentList $NetArgs
-    if ($procNC -eq $null) {}
+    if ($procNC -eq $null) {
         Start-Sleep -Seconds 5
         Start-Sleep -Seconds 5
     } else {
     } else {
         $procNC.WaitForExit() 
         $procNC.WaitForExit()