| OLD | NEW |
| 1 @echo off | 1 @echo off |
| 2 setlocal | 2 setlocal |
| 3 set argc=0 | 3 set argc=0 |
| 4 for %%x in (%*) do set /a argc+=1 | 4 for %%x in (%*) do set /a argc+=1 |
| 5 if %argc% geq 2 goto regbegin | 5 if %argc% geq 2 goto regbegin |
| 6 :: Not enough arguments. Print help text. | 6 :: Not enough arguments. Print help text. |
| 7 echo usage: | 7 echo usage: |
| 8 echo dev_uninstall.cmd ^<reg.exe 32 directory^> ^<reg.exe 64 directory^> | 8 echo dev_uninstall.cmd ^<reg.exe 32 directory^> ^<reg.exe 64 directory^> |
| 9 echo( | 9 echo( |
| 10 echo Uninstall Adblock Plus for IE in the developer mode | 10 echo Uninstall Adblock Plus for IE in the developer mode |
| 11 echo * Delete the registration the DLL as a per-user COM object with CSLID of
the Adblock Plus for IE BHO | 11 echo * Delete the registration the DLL as a per-user COM object with CSLID of
the Adblock Plus for IE BHO |
| 12 echo( | 12 echo( |
| 13 echo arguments: | 13 echo arguments: |
| 14 echo ^<reg.exe 32 directory^> ^| The directory for reg.exe to write into for
32 (resp. 64) bit registry | 14 echo ^<reg.exe 32 directory^> ^| The directory for reg.exe to write into for
32 (resp. 64) bit registry |
| 15 echo ^<reg.exe 64 directory^> ^| One of "system32", "SysWOW64", or "sysnativ
e" | 15 echo ^<reg.exe 64 directory^> ^| One of "system32", "SysWOW64", or "sysnativ
e" |
| 16 exit /b 0 | 16 exit /b 0 |
| 17 | 17 |
| 18 :regbegin | 18 :regbegin |
| 19 :: Set REG. It's based on either the third or fourth argument. | 19 :: Set REG. It's based on either the third or fourth argument. |
| 20 :: We test against "x86" because there are two possible 64-bit values. | 20 :: We test against "x86" because there are two possible 64-bit values. |
| 21 if /i %PROCESSOR_ARCHITECTURE% equ x86 (set R=%1) else set R=%2 | 21 if /i %PROCESSOR_ARCHITECTURE% equ x86 (set R=%1) else set R=%2 |
| 22 set REG="%WINDIR%\%R%\reg.exe" | 22 set REG="%WINDIR%\%R%\reg.exe" |
| 23 if exist %REG% goto regend | 23 if exist %REG% goto regend |
| 24 echo File %REG% not found. Aborting. | 24 echo File %REG% not found. Aborting. |
| 25 exit /b 1 | 25 exit /b 1 |
| 26 :regend | 26 :regend |
| 27 | 27 |
| 28 echo REG=%REG% | 28 echo REG=%REG% |
| 29 %REG% delete HKCU\Software\Classes\CLSID\{FFCB3198-32F3-4E8B-9539-4324694ED664}
/f >nul | 29 %REG% delete HKCU\Software\Classes\CLSID\{FFCB3198-32F3-4E8B-9539-4324694ED664}
/f >nul 2>&1 |
| 30 echo Done | 30 %REG% delete "HKCU\Software\Adblock Plus for IE" /f >nul 2>&1 |
| 31 echo Done |
| 32 exit /b 0 |
| OLD | NEW |