diff --git a/misc/pia.bat b/misc/pia.bat new file mode 100644 index 0000000..361f31e --- /dev/null +++ b/misc/pia.bat @@ -0,0 +1,24 @@ +@echo off +:: run this batch file THEN the Windows PIA app! +:: obtains PIA WireGuard config from *.conf file written to disk +:: opens up the *.conf file in notepad with config info +:: NOTE: the default PIA app installation directory + +set DIRECTORY=C:\Program Files\Private Internet Access +set PC="a.conf" +set PIA="%DIRECTORY%\data\w*.conf" + +start "PIA" "%DIRECTORY%\pia-client.exe" +timeout /t 2 /nobreak +"%DIRECTORY%\piactl.exe" disconnect +"%DIRECTORY%\piactl.exe" connect + +if exist %PC% del %PC% > nul +:START + echo . + if exist %PIA% copy %PIA% %PC% > nul + if exist %PC% notepad %PC% + if exist %PC% goto END + goto START +:END + if exist %PC% del %PC% > nul \ No newline at end of file