Which command adds or sets a registry value?

Study for the SANS560 GIAC Penetration Tester (GPEN) Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

Which command adds or sets a registry value?

Explanation:
Adding or setting a registry value is done with the reg add command. The reg suite includes reg add, reg query, reg delete, and reg export, where reg add specifically creates or updates a value. The syntax reg add [keyname] /v [valuename] /t [type] /d [data] shows you provide the key path, the value name, the data type (like REG_SZ, REG_DWORD), and the data to store. If the value doesn’t exist, reg add creates it; if it does exist, reg add updates it. You can add /f to overwrite without a prompt. For example: reg add "HKLM\Software\Example" /v Version /t REG_SZ /d "1.2" /f.

Adding or setting a registry value is done with the reg add command. The reg suite includes reg add, reg query, reg delete, and reg export, where reg add specifically creates or updates a value. The syntax reg add [keyname] /v [valuename] /t [type] /d [data] shows you provide the key path, the value name, the data type (like REG_SZ, REG_DWORD), and the data to store. If the value doesn’t exist, reg add creates it; if it does exist, reg add updates it. You can add /f to overwrite without a prompt. For example: reg add "HKLM\Software\Example" /v Version /t REG_SZ /d "1.2" /f.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy