There's no such thing as a stupid question, but they're the easiest to answer.


Software Development Software Development
Search Search
Search for:
Tech Support Guy > > >

Solved: How to write a batch file to amend a registry key??


lpool1's Avatar
lpool1 lpool1 is offline
Computer Specs
Junior Member with 9 posts.
Join Date: Apr 2010
Experience: Intermediate
30-Apr-2010, 04:06 AM #16
That's worked andy thanks for your help. My mistake with the quotations. There is an option in the command prompt to overwrite the existing file. Is there something I can add to the code to automatically approve?

andythepandy's Avatar
andythepandy andythepandy is offline
Computer Specs
Member with 367 posts.
Join Date: Jul 2006
Location: England
Experience: Intermediate to Advanced
30-Apr-2010, 04:10 AM #17
yes, just stick /f at the end of the line like:
reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\Components" /v DeskHtmlVersion /t REG_DWORD /d "0" /f
Squashman's Avatar
Trusted Advisor with 19,725 posts.
Join Date: Apr 2003
Location: 1265 Lombardi Ave
30-Apr-2010, 08:19 AM #18
Good Job OutCaste
TheOutcaste's Avatar
Computer Specs
Member with 9,028 posts.
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
30-Apr-2010, 09:33 AM #19
Don't forget to delete those two erroneous keys. You can do it from the Registry Editor, or the command line.
Copy and paste these two lines into the Command Prompt, then press Enter (you can paste them both at once)
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\Desktop\Components /v DeskHtmlVersion /t REG_DWORD /d 0" /F
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\Desktop\Components /v DeskHtmlVersion /t REG_DWORD /d 0x00000000" /F
To paste into the Command Prompt, right click the Window, click Paste. If Quick Edit is enabled, the right click will paste immediately.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

bat, batch file, xp batch file

Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Similar Threads
Title Thread Starter Forum Replies Last Post
Writing a batch file to control PowerISO mikejreading All Other Software 2 23-Sep-2009 10:06 PM
Solved: Batch file to concatenate then rename files nesr DOS/Other 7 21-Mar-2009 01:27 AM
Solved: Batch file to del *.txt files from a dir older than today odewallrus DOS/Other 8 24-Feb-2009 12:07 PM
how to create batch file for user login information bhanuk Windows XP 2 08-Jan-2009 07:29 AM
batch file to read from input file jpmg DOS/Other 6 30-Aug-2008 02:14 AM

You Are Using: Server ID
Trusted Website Back to the Top ↑