Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reg files or anything else you can think of

Posted on 2000-03-30
11
Medium Priority
?
184 Views
Last Modified: 2013-12-28
I need to change the dns, gateway, ip, and wins from a static to a dynamic (through the dhcp) for over 200 users.  I have created a reg file that does everthing except chamge the wins. Disableing Wins need to delete a registry key and i was wondering if anybody knew if it is possible from a reg file.  Microsoft says it is not but then again they say windows 98 is stable.  If there is no way to delete a registry key from a reg file they I will take any other ideas. UNLESS YOU KNOW HOW TO DELETE A REGISTRY KEY FROM A REG FILE, ONLY PLACE A COMMENT.  I WILL AWARD POINTS FOR OTHER IDEAS IF AND ONLY IF THEY ARE POSTED AS COMMENTS.

As always
Mr Happy
0
Comment
Question by:kind4me
[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
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 2669488
There must be a way to selete a registry key, else how do programs do an uninstall ?
I'll do some checking, but it should not be a big deal.
0
 

Expert Comment

by:TheMask
ID: 2669494
How do you want this key i mean which application will delete it ?do you want to make it a script for example ??
0
 
LVL 63

Accepted Solution

by:
SysExpert earned 777 total points
ID: 2669530
Got it. I hope this helps.
http://www.jsiinc.com/TIP2100/rh2165.htm
-----------------------------
To delete a key using Regedit, include a minus sign in front of the key path.

 Assume you had the following keys and values:

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff]
 "GuessWhat"="????"

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff\More]
 "HostName"="NameHost"

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap]
 "GuessWhat"="????"

 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zip]
 "ZipZap"="ZapZip"
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zap]
 "BlahBlah"="string"

 If you wanted to delete the entire Stuff service and the Zip subkey of the ZipZap service, you would
 submit the following within a .reg file (including the proper header for your version of Regedit):

 [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff]

 [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Stuff\More]

 [-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZipZap\Zip]

 If the file name was c:\regdel.reg, then:

 regedit /s c:\regdel.reg

 where the optional /s makes it silent.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 7

Expert Comment

by:cmcgee
ID: 2669539
You can do this via an INF file.

Check mine out for example.

; Deletes IHS Settings in the Registry
[version]
signature="$CHICAGO$"

[DefaultInstall]
DelReg=DeleteMe
AddReg=AddMe

[DeleteMe]
HKLM,"Software\Logicraft\lancd"
HKLM,"Software\Microsoft\Windows\CurrentVersion\App Paths\winm32.exe"
HKLM,"System\ControlSet001\Services\LanCD Service"
HKLM,"System\ControlSet001\Services\lancdl"
HKLM,"System\CurrentControlSet\Services\LanCD Service"
HKLM,"System\CurrentControlSet\Services\lancd"

[AddMe]




This file deletes any keys under the [DeleteMe] section.

In order to call this INF you can use a batch file with the following command.

RunDLL setupx.dll,InstallHinfSection RunIt 0 path\Del-Reg.inf

you can get more details from the MS KB article.

http://support.microsoft.com/support/kb/articles/Q171/4/24.ASP?LNG=ENG&SA=PER&FR=0

Craig
0
 
LVL 8

Author Comment

by:kind4me
ID: 2669554
WOW THAT WAS FAST, please let me test it and I will award points in a few minites
0
 
LVL 7

Expert Comment

by:cmcgee
ID: 2670021
Using the Minus works on NT, but I have never gotten it to work on 95/98 boxes.

Craig
0
 
LVL 8

Author Comment

by:kind4me
ID: 2670465
These are great but do you have anything for just strings, not whole keys

for instance:
[hklm\system\currentcontrolset\services\class\nettrans\0008]
"nodetype"="8"
"defaultgateway"=172.0.0.1"
I want to delete the default gateway and not the node type.

thanks
0
 
LVL 2

Expert Comment

by:Rheiniluoma
ID: 2670540
I experimented with this too. One problem that I encountered was that the \class\nettrans\000x did not always go to the right card (and in some cases didn't even point at a card).

This was even after loading the machines with Ghost.

I have no idea why it wasn't consistent.
0
 
LVL 8

Author Comment

by:kind4me
ID: 2670679
Rhein that is no problem I have beaten that but I need to know how to delete a key.

Thanks
Mr Happy
0
 
LVL 7

Expert Comment

by:cmcgee
ID: 2671412
I usually delete the whole key, and then re-enter any necessary strings back into it via a normal reg file.

Then there is the [AddMe]
secection as well...

Craig
0
 
LVL 8

Author Comment

by:kind4me
ID: 2673428
This was not EXACTLY what I was looking for but it did answer my question.  Thank you to everybody for your responses.  If anybody finds a way to delete just a string please e-mail me at MrHappy@pinkfloyd.com

thanks
-Lenny
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

722 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