Fix issues with spaces in path

This commit is contained in:
Pavel Valach 2020-12-04 22:47:24 +01:00
parent 0a91cb2639
commit 80b52c5cfe
No known key found for this signature in database
GPG Key ID: 5B4C9E8526682172

View File

@ -1,5 +1,7 @@
@echo off
set mypath=%~dp0
:: Check admin rights
NET SESSION >nul 2>&1
@ -54,8 +56,8 @@ goto main
:setup_wifi
cls
netsh wlan add profile filename="%0\..\Wi-Fi-Sincoolka.xml"
netsh wlan add profile filename="%0\..\Wi-Fi-Sincoolka 5G.xml"
netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka.xml"
netsh wlan add profile "filename=%mypath%Wi-Fi-Sincoolka 5G.xml"
echo.
@ -115,7 +117,7 @@ if "%iface%" == "" (
goto endEth
)
netsh lan add profile filename=\"%0\..\Ethernet.xml\" interface="%iface%"
netsh lan add profile "filename=%mypath%Ethernet.xml" interface="%iface%"
if %errorlevel% GTR 0 (
set iface=