Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6898349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:17:05+00:00 2026-05-27T07:17:05+00:00

I want to find the key Device Parameters’ under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE . But, the BD/DVD/CD

  • 0

I want to find the key “Device Parameters’ under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE.

But, the BD/DVD/CD ROM/Writers makes a different key in every system. Mine currently is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\CdRomHL-DT-ST_DVDRAM_GH20NS15________________IL00____\5&15602d3e&0&0.1.0\Device Parameters.

But I want to search every subkey under IDE and under BD/DVD/CD ROM/Writers to get the device parameters. There is a binary value DefaultDVDregion and i want to set it to 0 for every BD/DVD/CD ROM/Writers.

I’d like to do this in VBScript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:17:06+00:00Added an answer on May 27, 2026 at 7:17 am

    This code will loop through all the keys in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE and, for each key, look inside it to print out the DWORD value of DefaultDvdRegion.

    Option Explicit
    Const HKEY_LOCAL_MACHINE = &H80000002
    Dim oReg : Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
    Dim oShell : Set oShell = CreateObject("WScript.Shell")
    Dim sPath, aSub, sKey, aSubToo, sKeyToo, dwValue
    
    ' Get all keys within sPath
    sPath = "SYSTEM\CurrentControlSet\Enum\IDE"
    oReg.EnumKey HKEY_LOCAL_MACHINE, sPath, aSub
    
    ' Loop through each key
    For Each sKey In aSub
        ' Get all subkeys within the key 'sKey'
        oReg.EnumKey HKEY_LOCAL_MACHINE, sPath & "\" & sKey, aSubToo
        For Each sKeyToo In aSubToo
            ' Try and get the DWORD value in Device Parameters\DefaultDvdRegion
            oReg.GetDWORDValue HKEY_LOCAL_MACHINE, sPath & "\" & sKey & "\" & sKeyToo & "\Device Parameters", "DefaultDvdRegion", dwValue
            Wscript.Echo "DVDRegion of " & sPath & "\" & sKey & "\" & sKeyToo & " = " & dwValue
        Next
    Next
    

    It’s not my finest code, but should give you what you are looking for. On my machine, I get the following output:

    DVDRegion of SYSTEM\CurrentControlSet\Enum\IDE\CdRomOptiarc_DVD_RW_AD-7200S_________________1.0A____\5&3308a5ad&0&1.0.0 = 2  
    DVDRegion of SYSTEM\CurrentControlSet\Enum\IDE\DiskSAMSUNG_HD103UJ_________________________1AA01113\5&76d4b99&0&0.0.0 =
    

    Which makes sense, because my DVD drive has a region code of 2 (Europe) and my hard drive has no region code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to find out the key for given value from HashMap, currently I
All I want is a dictionary which tells me which key it couldn't find,
I want to find most optimal way to iterate values in key in python.
I have a table A that has primary key Id. I want to find
I have a dictionary, scores, of integers and I want to find the key(s)
I want to find an element in the map using map::find(key) , and then
I want to find a key in a map that is similar to a
I want to find out whether a certificate's private key is stored in a
I want to find records on a combination of created_on >= some date AND
I want to find a way to develop database projects quickly in Visual Studio.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.