i want a batch script that deletes this:

How can someone achieve that?
Thanks.
Moderator: DosItHelp
Code: Select all
wmic sysdriver where "displayname like 'VIA Rhine%'" get displayname
kennedydid911 wrote:
This is the result if I run this code.
Code: Select all
C:\Users\Squashman>wmic sysdriver where "displayname like 'Intel%'" get displayname
DisplayName
Intel AGP Bus Filter
kennedydid911 wrote:I want to run that batch script whenever my PC shuts down, is this possible with that devcon.exe?
Code: Select all
@echo off &setlocal
cd /d "%~dp0"
for /f "delims=:" %%i in ('devcon.exe listclass net^|find "VIA Rhine"') do for /f %%j in ("%%i") do devcon.exe remove "%%j"
Code: Select all
@echo off &setlocal
cd /d "%~dp0"
for /f "tokens=2 delims=:" %%i in ('chcp') do set /a oemcp=%%~ni
>nul chcp 1252
set "taskname=run_at_shutdown"
set "xmlfile=run_at_shutdown.xml"
set "line_01=<?xml version="1.0" encoding="UTF-16"?>"
set "line_02=<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">"
set "line_03= <RegistrationInfo>"
set "line_04= <Author>aGerman @ DosTips</Author>"
set "line_05= <URI>\run_at_shutdown</URI>"
set "line_06= <Description>Run Script At Shutdown</Description>"
set "line_07= </RegistrationInfo>"
set "line_08= <Triggers>"
set "line_09= <EventTrigger>"
set "line_10= <Enabled>true</Enabled>"
set "line_11= <Subscription><QueryList><Query Id="0" Path="System"><Select Path="System">*[System[Provider[@Name='User32'] and EventID=1074]]</Select></Query></QueryList></Subscription>"
set "line_12= </EventTrigger>"
set "line_13= </Triggers>"
set "line_14= <Principals>"
set "line_15= <Principal id="Author">"
set "line_16= <UserId>S-1-5-18</UserId>"
set "line_17= <RunLevel>HighestAvailable</RunLevel>"
set "line_18= </Principal>"
set "line_19= </Principals>"
set "line_20= <Settings>"
set "line_21= <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>"
set "line_22= <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>"
set "line_23= <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>"
set "line_24= <AllowHardTerminate>false</AllowHardTerminate>"
set "line_25= <StartWhenAvailable>false</StartWhenAvailable>"
set "line_26= <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>"
set "line_27= <IdleSettings>"
set "line_28= <StopOnIdleEnd>false</StopOnIdleEnd>"
set "line_29= <RestartOnIdle>false</RestartOnIdle>"
set "line_30= </IdleSettings>"
set "line_31= <AllowStartOnDemand>true</AllowStartOnDemand>"
set "line_32= <Enabled>true</Enabled>"
set "line_33= <Hidden>false</Hidden>"
set "line_34= <RunOnlyIfIdle>false</RunOnlyIfIdle>"
set "line_35= <WakeToRun>false</WakeToRun>"
set "line_36= <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>"
set "line_37= <Priority>5</Priority>"
set "line_38= </Settings>"
set "line_39= <Actions Context="Author">"
set "line_40= <Exec>"
set "line_41= <Command>C:\Windows\System32\cmd.exe</Command>"
set "line_42= <Arguments>/c "C:\scripts\at_shutdown.bat"</Arguments>"
set "line_43= </Exec>"
set "line_44= </Actions>"
set "line_45=</Task>"
<nul >"%xmlfile%" set /p "=ÿþ"
>>"%xmlfile%" cmd /u /q /c "for /f "tokens=1* delims==" %%i in ('set line_') do echo %%j"
>nul chcp %oemcp%
schtasks /create /xml "%xmlfile%" /tn "%taskname%" /f
del "%xmlfile%"
pause
Code: Select all
@echo off &setlocal
cd /d "%~dp0"
devcon listclass net
pause
Code: Select all
Listing 10 device(s) for setup class "Net" (Network adapters).
ROOT\MS_AGILEVPNMINIPORT\0000 : WAN Miniport (IKEv
2)
ROOT\MS_L2TPMINIPORT\0000 : WAN Miniport (L2TP
)
ROOT\MS_NDISWANBH\0000 : WAN Miniport (Netw
ork Monitor)
ROOT\MS_NDISWANIP\0000 : WAN Miniport (IP)
ROOT\MS_NDISWANIPV6\0000 : WAN Miniport (IPv6
)
ROOT\MS_PPPOEMINIPORT\0000 : WAN Miniport (PPPO
E)
ROOT\MS_PPTPMINIPORT\0000 : WAN Miniport (PPTP
)
ROOT\MS_SSTPMINIPORT\0000 : WAN Miniport (SSTP
)
PCI\VEN_1106&DEV_3106&SUBSYS_747C1462&REV_8B\4&1F7DBC9F&0&48F0: VIA Rhine III Fa
st Ethernet Adapter
ROOT\*ISATAP\0000 : Microsoft ISATAP A
dapter
Press any key to continue . . .
Code: Select all
@echo off &setlocal
cd /d "%~dp0"
devcon listclass net|find "VIA Rhine"
ECHO(
for /f "delims=:" %%i in ('devcon listclass net^|find "VIA Rhine"') do for /f %%j in ("%%i") do (
ECHO devcon disable "%%j"
devcon disable "%%j"
ECHO devcon remove "%%j"
devcon remove "%%j"
)
pause