Solved

I need to a script to delete reg keys and import after.

Posted on 2007-12-05
6
226 Views
Last Modified: 2010-04-21
I need a batch file or VB script that will do the following.

1) Delete the following registry key values:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\First-Run
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup\FirstRun

2) In the HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup subkey, set the value of ImportPRF to a string value that specifies the name and path of the PRF file. For example, set ImportPRF to \\server1\share\outlook.prf.
0
Comment
Question by:8wire
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:Taurance
ID: 20413344
You could just export the Registy values from a working system and apply them to the computer in question.
0
 

Author Comment

by:8wire
ID: 20413363
I need to do this on 100+ workstations.  Planning to deploy this through Active Directory to execute during logon.
0
 
LVL 5

Expert Comment

by:Taurance
ID: 20413416
So once you have the keys you need, move them to a share that can be accessed by all the specific computers and make a simple bat file that executes all of the files when the pc starts up...  If you dont want to do that you can also go into Group Policy and add the keys to the Computer Configuration > Windows Settings > Security Settings > Registry and add the registry files here and then enable the GP for those computers.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 5

Expert Comment

by:Taurance
ID: 20413472
The only problem I see is you are using currnet user and you need to go in and find the same key for "HKEY_USER" and use this with group policy.
0
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 20413533
This needs to happen in the logon script.
Assuming the clients are running XP (for reg.exe), the following should do the trick:

set ImportPrf=\\server1\share\outlook.prf
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup" /v "First-Run" /f
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup" /v "FirstRun" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Setup" /v ImportPRF /d "%ImportPrf%" /f
0
 

Author Closing Comment

by:8wire
ID: 31412906
This is perfect.  Thanks!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

919 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now