Regedit batch editing

Slickone

Diamond Member
Dec 31, 1999
6,120
0
0
Note this is a different problem from the people that have QT installed and can't remove the QT entry from their registry's startup (I have this problem on another machine).

Any time I go to a website that needs Quicktime, I get a QT entry added to my registry in the startup section (I don't have QT installed). On next boot, it creates the QT icon in the systray. So instead of manually going to regedit each time to remove it (which works until the next time I visit a website that has a QT file), I want to create a bat file I can run. I can't get it to work though. I have a .reg file with the following:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"QuickTime Task"=-


When I run it, it says the info was entered into the registry, but when I open regedit, the key and value are still there. This is on NT4. What am I doing wrong?
 

Slickone

Diamond Member
Dec 31, 1999
6,120
0
0
Originally posted by: Smilin
Originally posted by: Slickone
1. Read slower.

You're not going to get a quicktime icon if it's not installed.
That must not be true. This is my PC at work. I've never installed Quicktime, and I don't even think it will let me. I know no one else has either.
As I mentioned, if you go to a site requiring Quicktime, it puts the entry in the registry. It can be 'permanetly' removed, but will be put back if you visit a QT website again.
If you have QT installed, you can delete that entry, but it's not permanent. If you reboot, it's back.

But I'm just asking about regediting, not about QT.
 

catrats

Senior member
Aug 30, 2001
299
0
0
Originally posted by: Slickone
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"QuickTime Task"=-
Ok, I just want to make sure I'm understanding this correctly. You can manually delete this value in the registry but when you double-click on the .reg file you created from the quoted text, it doesn't delete the value? I assume you are using the same username in both cases. Finally, you didn't exactly mark where the end of your .reg file is so I'm assuming you have a empty line at the end of it, right?

 

Slickone

Diamond Member
Dec 31, 1999
6,120
0
0
Originally posted by: catrats
Originally posted by: Slickone
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"QuickTime Task"=-
Ok, I just want to make sure I'm understanding this correctly. You can manually delete this value in the registry but when you double-click on the .reg file you created from the quoted text, it doesn't delete the value?
Correct.
I assume you are using the same username in both cases.
You mean logged into WinNT? Yes.
Finally, you didn't exactly mark where the end of your .reg file is so I'm assuming you have a empty line at the end of it, right?
Maybe I don't quite understand your question, but are you asking if there's a blank line below the line of code (quoted above) inside the reg file? If so, probably not, but why would that matter?


 

Slickone

Diamond Member
Dec 31, 1999
6,120
0
0
I think all the examples I saw on the web showed Regedit 4 in their examples with the =-.
 

catrats

Senior member
Aug 30, 2001
299
0
0
You're right, Slickone. The REGEDIT4 header works for Windows 98 and Windows NT as well as Windows 2000, Windows XP and Windows 2003.
Originally posted by: Slickone
Maybe I don't quite understand your question, but are you asking if there's a blank line below the line of code (quoted above) inside the reg file? If so, probably not, but why would that matter?
Yes, that's exactly what I'm asking. As to why it matters: I'm not certain but it's my guess that a blank line is needed in order for the last line to be process properly during import. The registry may be picky that way. It's similar to the requirement to have a blank line between the header (REGEDIT4) and the rest of the file. It certainly doesn't hurt to try it out.
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0
I would wager that you would have better results with the reg.exe tool in the resource kit.
The command would be something along the lines of:

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Quicktime Task" /f
 

catrats

Senior member
Aug 30, 2001
299
0
0
Originally posted by: Slickone
Nope, a blank line didn't make it work.
Let's try a test. Under the very same key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]

add a value like "Test" and set it to anything like "This is a test". Now, modify the .reg file to delete the "Test" value and see if it works.