Solved

Find then delete Registry subkey

Posted on 2012-04-01
3
413 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
vb_elmar earned 500 total points
ID: 37792571
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
ID: 37792577
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
ID: 37792858
sorry for the delayed response,

yep worked just fine! thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

732 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