Solved

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

Posted on 2007-12-05
6
225 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.

760 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

21 Experts available now in Live!

Get 1:1 Help Now