Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add Registry entries from special text file

Office / VBA General

How to add Registry entries from special text file

by  SBendBuckeye  Posted    (Edited  )
This isn't technically speaking VBA code but there have been times when I needed to quickly setup a couple registry keys and this is an easy way to do it. Follow these steps and then verify using Regedit.

NOTE: Be careful, changing registry settings can hurt!

NOTE: Changes below will overwrite existing values!

A. Create a text file with .reg extension

1. Create text file with entries similar to these:

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\MyAppName\MyKeyName\]
"Media Request Timeout Seconds"=dword:30
"TempDir"="c:\\windows\\TEMP\\"

NOTE: Observe the doubled up backslashes for paths

NOTE: For other value types, find a similar entry and
use the Export option on the File or Registry
menu item (one or the other depending on system)
to see what is created

2. Save text file with .reg extenstion (eg TestIt.Reg)

B. Backup the registry

C. Add your changes by running the .reg file create above

1. Open file browser and find your .reg text file above

2. Double click .reg file name

3. Answer the prompts

4. Verify your entries using Regedit

Good Luck!
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top