Solved

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

Posted on 2007-12-05
6
231 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 84

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 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