Advertisement

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

Advertisement

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.
THREAD STARTER
 
Join Date: Apr 2010
Experience: Intermediate
30-Apr-2010, 05: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?

Lpool1
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, 05:10 AM #17
yes, just stick /f at the end of the line like:
Code:
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,648 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
30-Apr-2010, 09: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, 10: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)
Code:
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
WELCOME TO TECH SUPPORT GUY!

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.


Tags
bat, batch file, xp batch file

(clock)
THIS THREAD HAS EXPIRED.
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 11:06 PM
Solved: Batch file to concatenate then rename files nesr DOS/Other 7 21-Mar-2009 02:27 AM
Solved: Batch file to del *.txt files from a dir older than today odewallrus DOS/Other 8 24-Feb-2009 01:07 PM
how to create batch file for user login information bhanuk Windows XP 2 08-Jan-2009 08:29 AM
batch file to read from input file jpmg DOS/Other 6 30-Aug-2008 03:14 AM

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