Siemens Industry Online Support
Siemens AG
Entry type: FAQ, Entry ID: 18796767, Entry date: 04/14/2004

Logging off USB sticks from the operating system

  • Entry
  • Associated product(s)

How can I remove a USB stick from my computer without having to disable it beforehand via the operating system?

In principle all device drivers have to be disabled before they are removed from the computer. This is done via the Windows function "Remove Hardware". If you have blocked access to the operating system through WinCC, then you won't have access to the above-mentioned Windows function.

In this entry we explain how to disable devices (e.g. a USB stick) using the MS application DevCon. The MS application and more information on DevCon is available on the Microsoft Support site, article number: 311272.


  1. Load the MS application DevCon from the Microsoft Support site (http://support.microsoft.com). Double-click the self-extracting file to unpack it in a folder of your choice (e.g. d:\Devcon).

  2. In this folder you create a batch processing file called "Devcon.bat".

  3. Edit "Devcon.bat" and insert the following lines:
    d:\devcon\devcon remove USB\VID* 


    VID is the device name. If you want to disable all the USB devices, use"*".

  4. Create a button in a WinCC picture.

  5. Open the Properties of the button.

  6. Switch to the "Event" tab.

  7. Select "Mouse" and double-click on "Mouse Click".

  8. Insert the following code line into the script:

  9. Close the Script editor.

  10. Save the picture.

  11. Now when you enable WinCC and press the button, the USB stick is logged off from the system. The requirement is that there is a USB stick is slotted.

Please also refer to Entry ID: 18796988 - "WindowsXP/2000 with WinCC V6.0 and USB Stick".

No warranty is ever given for third-party software. Use of the software is entirely at the users own risk.

Security information
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about industrial security, please visit

Copy URL
mySupport Cockpit
Related links