Solved

Find then delete Registry subkey

Posted on 2012-04-01
3
412 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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