• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Enable/Disable Devices using Batch files

Messages
54
#1
I was wondering if there are any command line switches for devmgmt.msc so that I can write a batch file to enable or disable a certain piece of hardware.

My problem is whenever I use my Hamachi VPN (emulated as a network card) and leave my computer on afterwords and open up Firefox, I always get 'page not found' whenever I type in an address or go to a bookmark. I then have to open up Device Manager and disable the card and then my internet browser works as usual. Then, whenever I need to use Hamachi again, I just run devmgmt.msc again and enable the card.

I tried running 'devmgmt /?' in cmd but it just ignores the flag and runs the program. So I was wondering if there any ways to enable/disable devices using any command line program.

I have a feeling this may also be caused because I have my ethernet connection and my Hamachi VPN set as 'Home' networks.

Any help is appreciated.
 

My Computer

System One

  • Manufacturer/Model
    Acer Aspire 5630
    CPU
    Intel Core 2 Duo T5500 1.66GHz 65nm 667MHz FSB 2MB L2
    Motherboard
    Acer Grapevine Intel i945GM Chipset
    Memory
    2x1GB DDR2 333MHz
    Graphics Card(s)
    Intel Integrated GMA 950 256MB
    Sound Card
    Realtek High Definition Audio
    Monitor(s) Displays
    15.4" WXGA Acer CrystalBrite LCD 16ms
    Screen Resolution
    1280x800
    Hard Drives
    200GB 5400rpm Toshiba MK2035GSS ATA-7, 250GB 7200rpm Maxtor External USB Hard Drive

archie123

I Tunes hates Me
Vista Guru
Gold Member
Messages
1,831
Location
UK
#2
you could try disabling its specific service from the command line see if that works

Using Services.exe from the Command Line

im sure a little research would give tha answer how to do this via a batch file , i dont think there is a way to disable it via device manager apart from the old fasioned way.....im probably wrong :p
 

My Computer

System One

  • Manufacturer/Model
    Custom Build
    CPU
    Intel Q9550 @ 4Gig / Titan Fenir
    Motherboard
    XFX 780i
    Memory
    4GB OCZ PC2-8500C5 DDR2
    Graphics Card(s)
    Gainward GTX260/216 SLI
    Sound Card
    Creative X-FI Xtreme Gamer
    Monitor(s) Displays
    Dell UltraSharp 2209WA 22"
    Screen Resolution
    1680x1050
    Hard Drives
    western digital raptor 10000rpm sata
    PSU
    OCZ Modstream 700w
    Cooling
    Titan Fenir
    Mouse
    Logitech G5 Gamer
    Keyboard
    Razer Reclusa
    Internet Speed
    8mb
Messages
54
#4

My Computer

System One

  • Manufacturer/Model
    Acer Aspire 5630
    CPU
    Intel Core 2 Duo T5500 1.66GHz 65nm 667MHz FSB 2MB L2
    Motherboard
    Acer Grapevine Intel i945GM Chipset
    Memory
    2x1GB DDR2 333MHz
    Graphics Card(s)
    Intel Integrated GMA 950 256MB
    Sound Card
    Realtek High Definition Audio
    Monitor(s) Displays
    15.4" WXGA Acer CrystalBrite LCD 16ms
    Screen Resolution
    1280x800
    Hard Drives
    200GB 5400rpm Toshiba MK2035GSS ATA-7, 250GB 7200rpm Maxtor External USB Hard Drive

Users Who Are Viewing This Thread (Users: 1, Guests: 0)