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,932 of 42,547    |
|    Daniel to All    |
|    Question about powershellscript to batch    |
|    22 Apr 14 13:57:19    |
   
   From: daniel-r@gmx.net   
      
   Hy Folks ..   
   I have this powershellscript an need this via batch programming.   
      
      
   $devid = "*DEV_4236"   
   $status = devcon status $devid | Select-String "running"   
   if($status -eq $null)   
   {   
    write-host "Enabling wireless"   
    devcon enable $devid   
   }   
   else   
   {   
    write-host "Disabling wireless"   
    devcon disable $devid   
   }   
      
      
   Devcon is a substitute for the windows internal device manager.   
      
   With this microsoft programm i can switch devices via commandline.   
      
   I want to switch the wlan device by this script.   
      
   If status said, xxxxxxxxxxxxxxxxxxxxxxxxxxxx something...... "running"   
      
   The command is "devcon disable "*DEV_4236""   
      
   if not running, the command is "devcon enable "*DEV_4236""   
      
   how can i do this by batch ?   
      
   Regards   
      
   --- 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