home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 40,936 of 42,547   
   foxidrive to Daniel   
   Re: Question about powershellscript to b   
   23 Apr 14 13:22:46   
   
   From: foxidrive@server.invalid   
      
   On 23/04/2014 07:34, Daniel wrote:   
   > The output was :   
   > "Driver is running."   
   > if its enabled or   
   > "Device is disabled."   
   >   
   > if not   
   >   
   > In the Script the question was , if there is "running" its on an must be   
   > disabled, if no "running" there, its disabled and must be enabled.   
   >   
      
   That is what the code is meant to do, and should work if there is no "running"   
   in the output when it   
   is disabled.   
      
   Test the sample code below and see if it disables, and then enables, the wlan.   
      
      
   @echo off   
   devcon disable "*DEV_4236"   
   pause   
   devcon status "*DEV_4236" |find /i "running" || devcon  enable "*DEV_4236" &   
   pause & goto :EOF   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca