TranceEnergy Posted June 7, 2008 Posted June 7, 2008 (edited) I have the following in a .reg file, and when importing it, nothing happens. Keys doesnt get removed. Which is what i want to do.Windows Registry Editor Version 5.00[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\RTHDCPL][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\SkyTel][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\SoundMan][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\AlcWzrd][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Alcmtr]thats the contents.Now if i just:[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]Whole Run folder is removed, but it doesnt work to remove the individual keys therein.I've tried some combinations, but geesh.. Help? Edited June 8, 2008 by TranceEnergy
GrofLuigi Posted June 8, 2008 Posted June 8, 2008 Windows Registry Editor Version 5.00[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\RTHDCPL][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\SkyTel][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\SoundMan][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\AlcWzrd][-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Alcmtr]You mean:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]"RTHDCPL"=-"SkyTel"=-"SoundMan"=-"AlcWzrd"=-"Alcmtr"=-?I doubt they appear as you described them, or they wouldn't get executed anyway (except on win2000).GL
TranceEnergy Posted June 8, 2008 Author Posted June 8, 2008 Ok now im confused, because that works. According to what i read at http://support.microsoft.com/kb/310516"How to add, modify, or delete registry subkeys and values by using a registration entries (.reg) file"That would just erase the content of the registry keys, not the keys themselves.Thank you so much =)
GrofLuigi Posted June 8, 2008 Posted June 8, 2008 In registry terms:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] is a keyRTHDCPL is valuedata is whatever was inside itGL
TranceEnergy Posted June 8, 2008 Author Posted June 8, 2008 In registry terms:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] is a keyRTHDCPL is valuedata is whatever was inside itGLYes it makes sense when you say it like that, but it is not what i read MS describes it as. Alas MS fails to describe it properly but you do not.Thanks once again, also for making this observation.
Tarun Posted June 9, 2008 Posted June 9, 2008 Alas MS fails to describe it properly...Actually, Microsoft did explain it to you in plain English and quite clearly I might add.Syntax of .Reg FilesA .reg file has the following syntax:RegistryEditorVersionBlank line[RegistryPath1]"DataItemName1"="DataType1:DataValue1"DataItemName2"="DataType2:DataValue2"Blank line[RegistryPath2]"DataItemName3"="DataType3:DataValue3"They also very nicely explain exactly how to delete registry values:Deleting Registry Keys and ValuesTo delete a registry key with a .reg file, put a hyphen (-) in front of the RegistryPath in the .reg file. For example, to delete the Test subkey from the following registry key:HKEY_LOCAL_MACHINE\Softwareput a hyphen in front of the following registry key in the .reg file:HKEY_LOCAL_MACHINE\Software\TestThe following example has a .reg file that can perform this task.[-HKEY_LOCAL_MACHINE\Software\Test]To delete a registry value with a .reg file, put a hyphen (-) after the equals sign following the DataItemName in the .reg file. For example, to delete the TestValue registry value from the following registry key:HKEY_LOCAL_MACHINE\Software\Testput a hyphen after the "TestValue"= in the .reg file. The following example has a .reg file that can perform this task.HKEY_LOCAL_MACHINE\Software\Test"TestValue"=-To create the .reg file, use Regedit.exe to export the registry key that you want to delete, and then use Notepad to edit the .reg file and insert the hyphen.Both of those quotes come directly from the MSKB that you linked. Now for what you want to do, it's be exactly as GrofLuigi has said. Let's say you have a test application that you want to stop from starting up with the computer for every user account. You would put this into your .reg file:Windows Registry Editor Version 5.00 = Windows 2000 and upREGEDIT4 = Windows Me and below.So since you're working with Windows XP Pro x64, you would have:Windows Registry Editor Version 5.00HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"MyStartupApp"=-I would advise that you slow down and read through things thoroughly before jumping into things. When you edit the registry without knowing what you are doing, there is a great potential to cause problems.If anyone is unfamiliar with the registry, it's best to leave it alone.
TranceEnergy Posted June 9, 2008 Author Posted June 9, 2008 Alas MS fails to describe it properly...Actually, Microsoft did explain it to you in plain English and quite clearly I might add.Syntax of .Reg FilesA .reg file has the following syntax:RegistryEditorVersionBlank line[RegistryPath1]"DataItemName1"="DataType1:DataValue1"DataItemName2"="DataType2:DataValue2"Blank line[RegistryPath2]"DataItemName3"="DataType3:DataValue3"They also very nicely explain exactly how to delete registry values:Deleting Registry Keys and ValuesTo delete a registry key with a .reg file, put a hyphen (-) in front of the RegistryPath in the .reg file. For example, to delete the Test subkey from the following registry key:HKEY_LOCAL_MACHINE\Softwareput a hyphen in front of the following registry key in the .reg file:HKEY_LOCAL_MACHINE\Software\TestThe following example has a .reg file that can perform this task.[-HKEY_LOCAL_MACHINE\Software\Test]To delete a registry value with a .reg file, put a hyphen (-) after the equals sign following the DataItemName in the .reg file. For example, to delete the TestValue registry value from the following registry key:HKEY_LOCAL_MACHINE\Software\Testput a hyphen after the "TestValue"= in the .reg file. The following example has a .reg file that can perform this task.HKEY_LOCAL_MACHINE\Software\Test"TestValue"=-To create the .reg file, use Regedit.exe to export the registry key that you want to delete, and then use Notepad to edit the .reg file and insert the hyphen.Both of those quotes come directly from the MSKB that you linked. Now for what you want to do, it's be exactly as GrofLuigi has said. Let's say you have a test application that you want to stop from starting up with the computer for every user account. You would put this into your .reg file:Windows Registry Editor Version 5.00 = Windows 2000 and upREGEDIT4 = Windows Me and below.So since you're working with Windows XP Pro x64, you would have:Windows Registry Editor Version 5.00HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"MyStartupApp"=-I would advise that you slow down and read through things thoroughly before jumping into things. When you edit the registry without knowing what you are doing, there is a great potential to cause problems.If anyone is unfamiliar with the registry, it's best to leave it alone.You can put it however you like, english is not my native language, and at the end of the day, nothing in the link said to me that look, this is the syntax this is what this is and thats that. GL explained it in a single sentence, and that's all there is to it. A good example of kiss in effect imho.If you look at what i thought was right, and try to understand my pov, you would see it then made sense, even that i did know it was wrong.(why i posted in the first place)I simply tried what the ms article said in what way i understood it. Why slow down? Life's too short.
Tarun Posted June 9, 2008 Posted June 9, 2008 I completely understood where you were coming from. Just letting you know that Microsoft is not to blame; all of the information one would need is present in that article, and it is detailed quite nicely. Btw, you do an excellent job with the English language.
TranceEnergy Posted June 14, 2008 Author Posted June 14, 2008 I completely understood where you were coming from. Just letting you know that Microsoft is not to blame; all of the information one would need is present in that article, and it is detailed quite nicely. Btw, you do an excellent job with the English language.Thank you very much. The problem often is that while some things may seem foolproof in one's native tongue, doesnt make it so if you're not accustomed to *think* in that language.Reading and writing isn't everything. I actually still didnt quite understand it, but as long as i know how to do it, then that will do just fine.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now