If the registry key already exists, what happens when you run reg add?

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

If the registry key already exists, what happens when you run reg add?

Explanation:
Reg add updates or creates registry values. If the target key exists and you specify a value that already has data, the command writes the new data to that value, replacing the old information. In other words, the stored data is overwritten. If you want to overwrite without a prompt, include the /f flag; otherwise you may be asked to confirm the overwrite. It doesn’t make the key read-only, nor does it leave the existing data untouched.

Reg add updates or creates registry values. If the target key exists and you specify a value that already has data, the command writes the new data to that value, replacing the old information. In other words, the stored data is overwritten. If you want to overwrite without a prompt, include the /f flag; otherwise you may be asked to confirm the overwrite. It doesn’t make the key read-only, nor does it leave the existing data untouched.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy