From 80b52c5cfed8463917a17cb319bdaddb96e8b20c Mon Sep 17 00:00:00 2001 From: Pavel Valach Date: Fri, 4 Dec 2020 22:47:24 +0100 Subject: [PATCH] Fix issues with spaces in path --- sin-setup.bat | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sin-setup.bat b/sin-setup.bat index 885f802..88ca4da 100644 --- a/sin-setup.bat +++ b/sin-setup.bat @@ -1,5 +1,7 @@ @echo off +set mypath=%~dp0 + :: Check admin rights NET SESSION >nul 2>&1 @@ -52,10 +54,10 @@ goto main :: Import Sincoolka and Sincoolka 5G Wi-Fi profile -:setup_wifi -cls -netsh wlan add profile filename="%0\..\Wi-Fi-Sincoolka.xml" -netsh wlan add profile filename="%0\..\Wi-Fi-Sincoolka 5G.xml" +:setup_wifi +cls +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=