Batch pour hostednetwork

Résolu
Bonjour,
Je souhaite faire une commande qui quand je clique dessus démarre le hostednetwork si il est éteint et le stopper si il est allumé.
J'ai trouvé le code suivant mais il ne fait que l'allumer je ne comprends pas pourquoi.
@echo off
netsh wlan show hostednetwork|find "Statut"|find "started">nul && goto stop|| goto start

:start
    netsh wlan start hostednetwork
pause
    goto end

:stop
    netsh wlan stop hostednetwork
pause    
goto end

Comment faire ?
Cordialement

--
-insérez une citation bidon trouvée sur internet-

1 réponse

  1. Contributeur
    hello
    que retourne la commande, quand il est démarré et quand il ne l'est pas
    netsh wlan show hostednetwork
    1. Non démarré et Démarré
    2. Contributeur
      essayer
      netsh wlan show hostednetwork|find "Non">nul && goto start||goto stop
    3. ça marche super merci beaucoup :D