[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Working -- Script for Automatically delete a registry key when someone logs on

Posted on 2004-04-16
6
Medium Priority
?
147 Views
Last Modified: 2010-04-13
we have ghosted 60 HDDs with XP and rolled out to users. We have a windows 2k server and have one domain called VBI
Unfortunately our CA - Etrust virus software needed a seperate SID to work correctly via the anti virus admin console so we have to go round to each machine and delete a particular registry key

I thought there must be a better way. If we set up a group in Active Directory called "ETRUST" and add users to this group can we write a script ( i cant) that will delete the key in the registry of the computer that they log onto). I'd remove the people once they've done this.

Can anyone help with the script. I've heard of something called kixscripts but wouldn't know how to put this together.
0
Comment
Question by:Chris Michalczuk
[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
6 Comments
 

Expert Comment

by:jzanette
ID: 10845482
You can do this using ONLY native commands using NTCmdLib.cmd, the Expert NT/2K/XP/K3 Command Library from TheSystemGuard.com.

This library provides three commands for Registry Keys.

   .RegReadKey
   .RegWriteKey
   .RegDeleteKey

The syntax, in a shell script, would be

   CALL \\Server\ReadOnlyShareName\NTCmdLib.cmd /Init /Quiet
   SET "DeleteKey=HKEY_LOCAL_MACHINE\Software\YourKey"
   %.RegDeleteKey%
   %.Call% /Unload

*******

Replace "\\Server\ReadOnlyShareName\" with a commonly available share point for all the subject machines.
Replace "HKEY_LOCAL_MACHINE\Software\YourKey" with the complete registry path to the key you want to delete.

   NOTE:

            This is a VERY DANGEROUS command!  Be careful and
             MAKE SURE that you have set the DeleteKey variable to
             the correct key.  The subject key, including any subkeys
             and all data will be immediately and irrevocably deleted.

*******

The Expert Library provides over 400 such commands using ONLY what is available in a default installation of Windows NT4SP6a, 2000, XP and Server 2003.

More info at (http://NTCmdLib.com)
0
 
LVL 85

Accepted Solution

by:
oBdA earned 200 total points
ID: 10846598
Do yourself a *big* favor and leave that registry patching path you're on. Your machine deployment was wrong from the very beginning, and you need to correct this as soon as possible. That will clear out the business with your antivirus software as well.
After ghosting a machine for deployment, you *have* to run Sysprep, if you don't want to run into further problems like you're experiencing now. In your case, go to each machine, remove it from the domain, run sysprep, reboot, finish the mini setup wizard (or provide an answer file).

How to Use Sysprep: An Introduction
http://www.microsoft.com/windowsxp/pro/using/itpro/deploying/introduction.asp

Windows XP Service Pack 1 Deployment Tools
http://www.microsoft.com/downloads/details.aspx?FamilyID=7a83123d-507b-4095-9d9d-0a195f7b5f69&displaylang=en
0
 
LVL 4

Expert Comment

by:dean_dodd
ID: 10846813
at the command prompt type reg /?

you could use reg delete in a standard dos batch script.
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 12295337
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
Accept dean_dodd's comment as answer

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Leew
EE Cleanup Volunteer
0
 
LVL 85

Expert Comment

by:oBdA
ID: 12332000
First off, I don't want to step on anyone's toes here, and this is certainly not about the points either (as far as I'm concerned, this question can be PAQed with no points refunded), but even though dean_dodd's and jzanette's answer might have been what chrismichalczuk asked for, this is definitely not what he needs.
Manipulating the registry to get a software running that wouldn't work due to an *incorrectly* *installed* operating system is treating a symptom, not the cause; talk about applying heavy make-up to treat measles. Ghosting an NT4/W2k/XP installation without running sysprep will not only lead to software issues like the one described, it will in addition lead to a complete loss of Microsoft's support for these machines.

The Microsoft Policy Concerning Disk Duplication of Windows XP Installations
http://support.microsoft.com/?kbid=314823
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

656 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