Solved

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

Posted on 2007-12-05
6
230 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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