New
#71
Last edited by W10 Tweaker; 12 Mar 2021 at 08:32.
Error code 1 if it's related to netsh.exe means:
I figured this out after googling from one screenshot HEREnetsh command failed
client disconnected
If so and unless I'm wrong capturing logs (and reasons for failure) can be done also with netsh:
https://docs.microsoft.com/en-us/win...-manage-traces
In "C:\Scripts\WLAN\Netsh.vbs", replace the original code with the following:
Code:Set X=CreateObject("WScript.Shell"):Do:Return=X.Run _ ("%WinDir%\System32\netsh.exe wlan connect ""[ssid]"" ""{profile name]"" ""Wi-Fi""",0,True) If Return = 0 then WScript.Quit Attempts = Attempts + 1 : Loop until Attempts = 4 X.Run"C:\Scripts\WLAN\Testing.cmd":MsgBox "Error code: "&Return
Copy the following code into "C:\Scripts\WLAN\Testing.cmd", which will be run only if VBScript has failed to start the connection.
Hopefully, it will show the culprit.Code:@echo off Netsh WLAN connect "[ssid]" "{profile name]" "Wi-Fi" Echo The errorlevel is %errorlevel% Netsh WLAN show interfaces Netsh WLAN show networks Netsh WLAN show drivers Netsh WLAN show profiles pause>Nul
By googling, I found the following example:Source: [Closed] ERROR: netsh command failed: returned error code 1 - OpenVPN Support ForumCode:Mon Nov 18 17:15:25 2013 ERROR: netsh command failed: returned error code 1 Mon Nov 18 17:15:29 2013 MANAGEMENT: Client disconnected Mon Nov 18 17:15:29 2013 NETSH: command failed
Last edited by Matthew Wai; 12 Mar 2021 at 00:37.
Thanks for the info zebal and contributing.
Excellent! Thanks again for your continued perseverance.
Hopefully, this will produce a clue as to where the failure is happening.
I've updated the Netsh.vbs file and added the 'Testing.cmd' file.
2 successful auto-connect to Wi-Fi out of 2 attempts.