troubleshooting Question

login batch script to modify reg if certain reg file exist on pc

Avatar of samiam41
samiam41Flag for United States of America asked on
Windows XPWindows Server 2003Shell Scripting
16 Comments2 Solutions917 ViewsLast Modified:
Hi Experts.  As I upgrade these Windows XP machines from Office 2003 to 2007, I need to modify the registry on the upgraded pc's.  I don't know the term to use for the login script to modify the registry only if the Office 12.0 reg entry is there.  This is what I have:

if exist "hkcu\software\microsoft\office\12.0"
reg delete HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Setup\First-Run

I'm not sure how to specify what to do if that reg file does "not" exist.  How can I specify if exist, do A; if entry doesn't exist, do B?

Thanks in advance.
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 2 Answers and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros