Add .reg file to startup script

I have a .reg file that deletes the Adobe Reader history in the registry.

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\AVGeneral\cRecentFiles]


I want to get this to run silently at startup or through a login script.  It needs to be pushed out to 200 computers.
drgleocklerAsked:
Who is Participating?
 
Joseph MoodyConnect With a Mentor Blogger and wearer of all hats.Commented:
reg delete "HKCU\Software\Adobe\Acrobat Reader\9.0\AVGeneral\cRecentFiles" /f

Use the line above and let me know if it works.
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
Create a batch file and use "reg delete HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\AVGeneral\cRecentFiles"
0
 
drgleocklerAuthor Commented:
Will this prompt the user?
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Joseph MoodyBlogger and wearer of all hats.Commented:
Not if you add a "/f". This will force the deletion without prompt.
0
 
drgleocklerAuthor Commented:
The batch file doesn't remove the registry key. The .reg file does.
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
Are you wanting to delete all files under that key or just a select few?
0
 
drgleocklerAuthor Commented:
All the keys....As Adobe documents are viewed it adds a c1, c2 etc. I need the whole cRecentFiles deleted.  As more PDF's are viewed it recreates the file.  Thats why I need to remove it at logoff.  Security reasons for shared PC's
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
Create this as a batch file and set it to run at user login. It will silently delete all subkeys under cRecentFiles.

reg delete "HKCU\Software\Adobe\Acrobat Reader\9.0\AVGeneral\cRecentFiles" /va /f
0
 
drgleocklerAuthor Commented:
Still not working? Could it be some sort of syntax issue?  I'm trying to just run the bat file to test.  The reg file still works fine.
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
If you open up command prompt and paste that line exactly, what do you see?
0
 
drgleocklerAuthor Commented:
It says operation completed successfully. But if I go to regedit the key is still there.
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
But all of the sub keys are gone.

You can test this by manually creating a few fake string values under that key
0
 
drgleocklerAuthor Commented:
No the subkeys are there. If I open up Adobe I can view the document history.  We're trying to clear Adobe document history because our paystubs are PDFs. If someone opens up their paystub on a shared PC, they can go back to previously viewed documents.

I need this batch file to delete the cRecentFiles entry.

Sorry to be a pain...
0
 
drgleocklerAuthor Commented:
It worked that time...Not sure what I was missing before.

Thank you!
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
No problem. The /va command kept the subkey. Make sure that deleting that entire key doesn't cause any problems with Adobe Reader crashing.
0
 
drgleocklerAuthor Commented:
Hasn't so far....as soon as you open a PDF it just recreates the key.

Thanks again!
0
 
Joseph MoodyBlogger and wearer of all hats.Commented:
No problem at all!
0
 
drgleocklerAuthor Commented:
Kudos to Jmoody10 for sticking with me on this problem!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.