Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Trying to use reg.exe to add multiple values under a key

Posted on 2008-10-01
2
Medium Priority
?
1,547 Views
Last Modified: 2011-10-03
Hello Team,

I am trying to add a reg key and DWORD values via GPO.

Here is what I have:
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache\ExclusionErrorSuppressionList\ /v \\*\*\*\*.pst /t REG_DWORD

Works great for adding the one value:  \\*\*\*\*.pst  REG_DWORD (0)

But i want to add a few more values in one shot, notably.
\\*\*\*\*.pst
\\*\*\*\*.mdb
\\*\*\*\*.ldb
\\*\*\*\*.ost

Can someone rerite this for me, does have to be all the values, but just shot me how to have multuple values entered in a key in one command.

THANK YOU!
0
Comment
Question by:jaesoul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
DewFreak earned 1500 total points
ID: 22619742
The reg.exe tool will not do what you want.  Just create a BAT file and enter:

REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache\ExclusionErrorSuppressionList\ /v \\*\*\*\*.pst /t REG_DWORD
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache\ExclusionErrorSuppressionList\ /v \\*\*\*\*.mdb /t REG_DWORD
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache\ExclusionErrorSuppressionList\ /v \\*\*\*\*.ldb /t REG_DWORD
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache\ExclusionErrorSuppressionList\ /v \\*\*\*\*.ost /t REG_DWORD
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 22619908
Or setup a loop:

for %a in (pst mdb ldb ost) do REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache\ExclusionErrorSuppressionList\ /v \\*\*\*\%a /t REG_DWORD


use two %s if in a batch file..
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question