?
Solved

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

Posted on 2007-12-05
6
Medium Priority
?
238 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 85

Accepted Solution

by:
oBdA earned 2000 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This article will show, step by step, how to integrate R code into a R Sweave document
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…
Suggested Courses
Course of the Month17 days, 6 hours left to enroll

862 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