2014年3月31日 星期一

Microsoft hướng dẫn gỡ bỏ Internet Explorer 9/10/11

Với Internet Explorer 9: FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*9.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart
Với Internet Explorer 10: FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart
Với Internet Explorer 11: FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*11.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart

2014年3月22日 星期六

How to disable or enable USB Ports

How often you have witnessed blocked Pen drive or USB drive access in your work place or college or school? I believe many times; in fact every time you try to use the USB drive, you are not allowed, simply because the administrator has disabled USB drive detection on your PC. Again, how often has your data been stolen because someone connected an unauthorized USB to your computer and copied your files?  Well, you don’t need to worry because the solution to disable or enable USB Ports is pretty simple.

Restrict access to USB drives

There are three ways an administrator can prevent using of USB Drives.

They are:
  1. Altering registry values for USB Mass Storage Devices.
  2. Disabling USB Ports from Device Manager.
  3. By Un-installing the USB Mass Storage Drivers.
Lets us look at how we can fix these problems and enable USB on Windows 7 PC.

1. Disable or Enable USB Mass Storage Devices using Registry.

If the administrator is smart then he would definitely do this to ensure a tight blockade. He would alter the settings through regedit command on run console. Now how do you unlock it ? You have to go right into where the administrator has been. Here is how.
  1. Go to Start > Run , type “regedit” and press enter to open the registry editor
  2. Navigate to the following key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR
In the right pane, select Start and change the value to 3. (The value 4 will disable USB Storage). Click OK. This will re-enable USB Ports and allow you to use USB or Pen drives.
image1 How to disable or enable USB Ports in Windows 7 | 8

2. Disabling USB Ports from Device Manager.

If you still don’t find your USB drive working, you may have to look into the Device Manager. The Administrator could have possibly disabled the USB port here. Check out for any possibility in the Device Manager and enable the disabled port by right clicking on selected one and click Enable.
image2 How to disable or enable USB Ports in Windows 7 | 8

3. By un-installing the USB Mass Storage Drivers.

If the authorities are really worried about security in the school they would take the extreme step of un-installing the USB Mass Storage Drivers. To make things work, just install the device drivers. Here is how you do it.
As when you plug-in your USB drive, Windows will check for drivers, if not found Windows will prompt you to install the driver. This would definitely unlock the Pen drive at your School or office.

4. Use USB Drive Disabler /Enabler.

You can download and use a free tool USB Drive Disabler / Enabler which will allow you to easily enable or disable USB drives on your Windows computer.
usb disabler How to disable or enable USB Ports in Windows 7 | 8

2014年3月21日 星期五

Disable USB mà không ảnh hưởng đến Mouse và Keyboard

****************************
@echo off
:: Retreive Windows Language
:detect
for /f "Skip=1 Tokens=3*" %%i in ('reg QUERY "hklm\system\controlset001\control\nls\language" /v Installlanguage') do set language=%%i

:: Dutch - Belgium
if "%language%" == "0813" (
set users=Gebruikers
goto select
)
:: Dutch - Netherlands
if "%language%" == "0413" (
set users=Gebruikers
goto select
)
:: English - United States
if "%language%" == "0409" (
set users=Users
goto select
)

:select
if /I "%1" == "enable" goto enable_usbstor
if /I "%1" == "disable" goto disable_usbstor

echo Invalid commandline options
echo.
echo %0 - Enable or disable USB mass storage
echo %0 enable - enable USB mass storage
echo %0 disable - disable USB mass storage
exit /b 1

:enable_usbstor
echo Enabling USBstor driver
:: Enable USBstor driver
reg add HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR /v Start /t REG_DWORD /d 3 /f
:: Enable permissions on USBstor driver
cacls %SystemRoot%\inf\usbstor.inf /E /G %users%:R
cacls %SystemRoot%\inf\usbstor.PNF /E /G %users%:R
:: Leave state for WPKG to check on
if exist %SystemRoot%\usbstor-disable.tmp del %SystemRoot%\usbstor-disable.tmp
echo enable > %SystemRoot%\usbstor-enable.tmp
goto end

:disable_usbstor
echo Disabling USBstor driver
:: Disable USBstor driver
reg add HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR /v Start /t REG_DWORD /d 4 /f
:: Disable read permissions on USBstor driver
cacls %SystemRoot%\inf\usbstor.inf /E /R %users%
cacls %SystemRoot%\inf\usbstor.PNF /E /R %users%
:: Leave state for WPKG to check on
if exist %SystemRoot%\usbstor-enable.tmp del %SystemRoot%\usbstor-enable.tmp
echo disable > %SystemRoot%\usbstor-disable.tmp
goto end

:end
exit /b 0


**************************************