Solved

Find then delete Registry subkey

Posted on 2012-04-01
3
408 Views
Last Modified: 2012-04-01
experts,

ive looked around the posted threads on this and cannot find anything that i can understand/ applies to what i need. Im trying to create a simple batch file that will find a registry subkey under HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings

my company had implemented a new web filter and its loading this proxy.pac registry subkey when a new user logs into a computer. instead of opening cmd runas admin, regedit, search registry for proxy.pac then deleting it i would like to create a batch file to do it for me.

yeah i know its not much but when you have over 100 users and this proxy.pac loads itself back every few days for every user.... you see how this can become frustrating. I would take this up with our main IT HQ but they are useless and have not fixed the issue in two weeks!
0
Comment
Question by:MattLight
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
vb_elmar earned 500 total points
Comment Utility
If you just want to delete the key, use

Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegDelete "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\[mySubKeyName]"
Set WSHShell = Nothing


Put the code above on temp.vbs and run it.
0
 
LVL 1

Author Comment

by:MattLight
Comment Utility
ill check it out and post the results here in a few, gotta take care of a user first. thanks!
0
 
LVL 1

Author Comment

by:MattLight
Comment Utility
sorry for the delayed response,

yep worked just fine! thanks!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article discusses the Chain of Responsibility pattern, explaining What it is;Why it is; andHow it is At the end of this article, I hope you will be able to describe the use and benefits of Chain of Responsibility.  Backgrou…
Introduction This question got me thinking... (http://www.experts-exchange.com/questions/28707487/GLOBALS.html) Why shouldn't we use Globals? This is a simple question without a simple answer.  How do you explain these concepts to a programmer w…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

744 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

15 Experts available now in Live!

Get 1:1 Help Now