It is currently Thu Jun 07, 2018 6:18 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Mar 22, 2013 7:58 am 
Offline
User avatar

Joined: Thu Feb 21, 2013 11:04 pm
Posts: 463
For this Tutorial, I'll be demonstrating how to use DevCon to Enable / Disable your Microphone & Webcam and/or Network Adapter and other System Devices by disabling specific Imaging & Sound or other Devices Installed on your system..

It works best if your Microphone is plugged into a separate Audio device than your speakers, such as an on-board Audio & a PCI Audio Card or an External USB Audio Device.. otherwise your speakers will be turned off with your microphone

This is an important security measure, since its quite easy to hack into your microphone & camera, and people can see & listen to you wherever you are, even if you disable them in your Audio or Camera settings.. Also great for laptops when you have a camera pointing at your face 24/7 and no way to turn it away from you

-
How to Use DevCon to Disable / Enable System Devices from Custom Classic Shell Buttons:
-
  • Step 1 - Getting a Working Devcon.exe File:
    • I've found the older stand-alone ones dont work so good as they arent updated, and the newest versions are only included in the WDK
    • Download the WDK (Windows Driver Kit) from Microsoft, here:
    • Choose "Download Windows Driver Kit 8"
    • Don't Select to Download Additional Things, just select the normal install, its about a 1GB Download... if you have problems later, you may want to download the offline installer for use with other computers.. I believe its an .ISO file
    • You only need one 85kb program.. you can delete the rest after you extract the one little program.. if you download the program by itself from Microsoft, its older and likely wont work in Windows 7, so you probably just have to get the entire WDK first
-
  • Step 2 - Extracting the Program from the WDK to your System:
    • Browse to your install folder, such as D:\Program Files (x86)\Windows Kits\8.0\Tools\x64 (for 64-bit versions of Windows)
    • Find the program called Devcon.exe
    • Right-click & select "Copy"
    • Browse to C:\Windows\System32
    • Right-Click an Empty area and select "Paste"
-
  • Step 3 - Identifying your Devices:
    • Open Device Manager:
      • Hit the Windows Key+Pause/Break Key
      • Click on Device Manager in the upper right-hand corner
    • Browse down to "Imaging Devices" and look at the name of your camera, remember it
    • Browse down to "Sound, Video, & Game Controllers" & look at the name of your Audio Controller, remember it as well
-
  • Step 4 - Creating a Device List with Devcon:
    • Method1:
      • Open Device Manager
      • Right-click the device you want to get the ID for
      • Select "Properties" > Then go to the "Details" tab
      • Select "Hardware Ids", then copy the First String Value
    • Method 2:
      • Hit Start>Run>Type "Cmd" & Hit Ctrl+Shift+Enter to open a Command Prompt with Administrator Privileges
      • Type:
        • devcon hwids * > hwids.txt
      • a Long List should Appear
      • Browse to: C:\Users\Your Username
      • Open hwids.txt
      • Edit>Find
      • Search for the name of your USB or IEEE Video Device you remembered from above
      • Copy the First String of Numbers under the name, below "Hardware ID's", such as:
        • USB\VID_0AC8&PID_3313&REV_0100&M310_010100
      • Repeat with the Audio Device you use for your Microphone (not the device you use for your speakers)
-
  • Step 5 - (Enabling the .Bat File Extension):
    • Be sure your computer is set to "view extensions for known file types":
      • Open a Window
      • Click "Organize"
      • Click "Folder & Search Options"
      • Click the "View" Tab
      • Uncheck "Hide extensions for Known File Types"
      • Click Apply
-
  • Step 6 - Creating the .Bat Files:
    • Create 2 Bat Files:
      • Right-Click your Desktop
      • New>Text Document
      • Name it "Disable Chat.bat"
      • Click Save
      • Right-Click your Desktop Again
      • New>Text Document
      • Name it "Enable Chat.bat"
      • Click Save
    • Enter the Following Text in the "Disable.Bat" File:
      • C:\Windows\System32\devcon disable "Your Device ID you Remembered from steps 3 & 4 above"
      • Such as: C:\Windows\System32\devcon disable "USB\VID_0AC8&PID_3313&REV_0100&M310_010100"
      • The Quotes & Spaces are Important
    • Repeat with all Devices you want to Disable on this .Bat File, Such as:
      • C:\Windows\System32\devcon disable "USB\VID_0AC8&PID_3313&REV_0100&M310_010100"
      • C:\Windows\System32\devcon disable "USB\VID_F183&PID_AF5&REV_01&M31_0100"
    • Click Save & Close the Disable.Bat File
    • Enter the Following Text in the "Enable.Bat" File:
      • C:\Windows\System32\devcon enable "Your Device ID you Remembered from steps 4 & 5 above"
      • Such as: C:\Windows\System32\devcon enable "USB\VID_0AC8&PID_3313&REV_0100&M310_010100"
      • The Quotes & Spaces are very Important
    • Repeat with all Devices you want to Enable on this .Bat File, Such as:
C:\Windows\System32\devcon enable "USB\VID_0AC8&PID_3313&REV_0100&M310_010100"
C:\Windows\System32\devcon enable "USB\VID_F183&PID_AF5&REV_01&M31_0100"
    • Click Save & Close the Enable.Bat File
    • Put the Files in a Permanent Storage Location
-
  • Step 7 - Allowing your .Bat to Run with Administrator Privileges:
    • Right-Click the "Disable.Bat" file
    • Click "Create Shortcut"
    • Right-Click on the Shortcut
    • Name the Shortcut "Disable Online Communication"
    • Select "Properties"
    • Go to the "Shortcut" Tab
    • Click on "Advanced..."
    • Select "Run as Administrator"
    • Click OK, Apply, & OK
    • Repeat the same steps with the "Enable.Bat" file, Creating a Shortcut named "Enable Online Communication", and allowing it to Run as an Administrator
    • Change the Icon for the Shortcuts, if you like
-
  • Step 8 - Adding your Devcon .Bat Files to Classic Shell:
    • Method 1:
      • Create 2 new items
      • Right-Click > Rename Item
        • Name them "DisableChat" & "EnableChat"
      • Right-Click > Edit Item
        • Label: "Disable Chat" & "Enable Chat"
        • Link: "(Full Path to Shortcut Location)\Disable Online Communication.lnk" & "(Full Path to Shortcut Location)\Enable Online Communication.lnk"
        • Icons: I've included 2 Icons I use at the bottom of this post
    • Method 2:
      • Place the Shortcuts in the folder you keep all of your Classic Menu Shortcuts to "Run as Administrator" items, such as "CMD as Administrator" in your custom "Run..." folder button, as described here: http://classicshell.net/forum/viewtopic.php?f=5&t=297
      • Click Start Menu>Run... Folder > Run As Administrator > Disable
    • After executing the Disable or Enable Command, click Yes to the UAC Prompt
    • You know it works when you right-click the device in Device Manager and it reads "enable" instead of "Disable", and vice versa
-

Additional Information about DevCon
-
** DEVCON COMMANDS MUST BE RUN AS AN ADMINISTRATOR
** DEVCON BAT FILE COMMANDS MUST BE RUN FROM SHORTCUTS WHICH ARE SET TO RUN AS ADMINISTRATOR
(the Bat file wont run automatically as an administrator)
** DEVICE IDS MUST BE SURROUNDED WITH QUOTES (if there are any Spaces or special characters, such as '&', etc)
** INSTANCE IDS MUST HAVE AN @ AT THE BEGINNING OF THE STRING, WITH THE ENTIRE STRING & THE @ ALL IN QUOTES (as the above quotes are needed)
** DEVCON RUNS ONLY THROUGH THE COMMAND PROMPT , or through direct reference, such as in .Bat files. It does not Open when you click on it, since it needs to have an argument, and cannot run by simply "devcon", which produces an error and is the reason why it opens suddenly & then closes if you try to click on it.
-
Here are some Useful Devcon commands:
-
devcon status * Shows Status of all Devices
devcon status usb\* Shows Status of all USB Devices
devcon status pci\* Shows Status of all PCI devices
devcon status "Hardware ID #" Paste your hardware ID to show the Status of it
devcon hwids * Shows all Hardware IDs
devcon hwids * > hwids.txt (output to C:\Users\Username)
devcon hwids usb\* Shows Hardware IDs to all USB devices
devcon hwids pci\* Shows Hardware IDs to all pci devices
devcon find * Finds all Devices
devcon find usb\* Finds all USB Devices
devcon find pci\* Finds all PCI Devices
devcon find "Hardware ID #" Paste your hardware ID to Find it

devcon listclass usb 1394 (Lists Classes for both USB & 1394 Devices)
also:
devcon find * | find "Creative"
devcon find * | find "PCI"
devcon find * | find "USB"

--------------------------------------------------------------------------------------

Here is a more comprehensive list of Devcon Commands, from Microsoft:

http://support.microsoft.com/kb/311272


Attachments:
Enable.png
Enable.png [ 24.13 KiB | Viewed 36633 times ]
Disable.png
Disable.png [ 24.17 KiB | Viewed 36633 times ]


Last edited by Tenzen on Sun Mar 31, 2013 5:50 am, edited 6 times in total.
Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 22, 2013 9:31 am 
Offline
User avatar

Joined: Thu Feb 21, 2013 11:04 pm
Posts: 463
This same method is also very useful for Disabling & Enabling the Network Adapter for entering Instant & Secure Offline Computing Mode

Just replace the Device ID with the first string in your Network Adapter Hardware ID

then follow all the steps, changing the names to "Connect" & "Disconnect"

then customize your Icons


Attachments:
Disconnect.png
Disconnect.png [ 83.21 KiB | Viewed 36628 times ]
Connect.png
Connect.png [ 79.92 KiB | Viewed 36628 times ]
Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 22, 2016 11:56 pm 
Offline

Joined: Fri Jan 22, 2016 10:59 pm
Posts: 1
After you'r trick I can disable my Microphone in Device Manager but it's seems still enable in "Sound > Recording".



:roll: Here you can see that. Google Chrome still use my Mic. I want to stop that.
When I disable Mic from "Sound" that disappears in "Device Manager".



I want totally disable the Mic so any application can't access that without my permission & save my laptop's battery life also.
So can we do that....... !!! If possible please mention that asap.


The following trick working properly for Camera.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.