You are not logged in.
I want to add these two commands:
netsh wlan show drivers | find "administrator" && msg * "Please run as Administrator" && exit
netsh wlan show drivers | find "Hosted network supported : Yes" || msg * "Your Wireless Network Adapter is not supported."
to make one single command with one "netsh wlan show drivers" but still functions like the two above, if the 1st command is processed, the 2nd will not be done
Please help me
Offline
This will do what you want. We don't care about the output from OPENFILES. Just use it to detect if we have Admin privileges.
openfiles >nul && (netsh wlan show drivers | find "Hosted network supported : Yes" || echo * Your Wireless Network Adapter is not supported.) & pause
Windows Shell Scripting and InstallShield
Offline
thank you, it's helpful, but I've found another solution which is more particular
for /f %%D in ('netsh wlan show drivers ^| findstr /i /c:"Hosted network supported : No" /c:"administrator"') do (
set x=%%D
if %%D==Hosted msg * /time:4 Your Wireless Network Adapter is not supported. && exit
)
set x | find "x=" && msg * /time:3 "Please right click the file -> Run as Administrator to start."
Offline