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,942 of 42,547    |
|    Todd Vargo to Daniel    |
|    Re: Question about powershellscript to b    |
|    23 Apr 14 17:51:16    |
      From: tlvargo@sbcglobal.netz              On 4/23/2014 5:02 AM, Daniel wrote:       > Nope .. only once it works..       >       >       > These are the complete outputs with devcon status       >       >       > PCI\VEN_14E4&DEV_4315&SUBSYS_E003105B&REV_01\4&1A6B52AB&0&00E1       > Name: Broadcom 802.11g Network Adapter       > Driver is running.       > 1 matching device(s) found.       >       > and       >       > PCI\VEN_14E4&DEV_4315&SUBSYS_E003105B&REV_01\4&1A6B52AB&0&00E1       > Name: Broadcom 802.11g Network Adapter       > Device is disabled.       > 1 matching device(s) found.       >       >       > Only the first Line in batch will be interpreted.. if i switch the       > lines , the first one ever will work              No, that is incorrect. The entire output is piped to the FIND command.       Actually, it is a bit puzzling how devcon status "*DEV_4236" returns       either one of those outputs. Neither one has DEV_4236 in them.              Here is another way to toggle a device.       (I'm not sure if the * is really needed.)               @echo off        set "devid=*DEV_4236"        devcon status "%devid%" |find /i "running" >nul        if errorlevel 1 (        echo Enabling wireless        devcon enable "%devid%"        ) else (        echo Disabling wireless        devcon disable "%devid%"        )                     --       Todd Vargo       (Post questions to group only. Remove "z" to email personal messages)              --- 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