+ Post New Thread
Results 1 to 5 of 5
Windows Thread, Batch file to remove registry key doesnt work in Technical; Im trying to disable Dr Watson throughout the school to at least partly help with my IE7 crashing problem Im ...
  1. #1

    Join Date
    Jul 2006
    Location
    London
    Posts
    2,962
    Thank Post
    159
    Thanked 152 Times in 116 Posts
    Rep Power
    49

    Batch file to remove registry key doesnt work

    Im trying to disable Dr Watson throughout the school to at least partly help with my IE7 crashing problem

    Im following the instructions written here

    http://support.microsoft.com/kb/188296

    Ive exported the .reg file, and added a - in it to remove the key as stated here
    http://support.microsoft.com/kb/310516

    and it works fine.

    This is the reg file:
    Code:
    Windows Registry Editor Version 5.00
    
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
    "Auto"="1"
    "Debugger"="drwtsn32 -p %ld -e %ld -g"
    "UserDebuggerHotKey"=dword:00000000
    So now I want to use a batch file so I can run it on bootup.
    I have been using the line
    Code:
    regedit /s DrWatsonRemove.reg
    Which for any other reg file (adding one) works fine.
    But for some reason with this one (removing a key) the batch file just runs and nothing happens

    Any ideas? I'm sure Im just doing something stupid, so just putting it here in case anyone can see a mistake im making

  2. #2
    meastaugh1's Avatar
    Join Date
    Jul 2006
    Location
    London/Hertfordshire
    Posts
    889
    Thank Post
    69
    Thanked 85 Times in 70 Posts
    Rep Power
    32

    Re: Batch file to remove registry key doesnt work

    How about reg import drwatsonremove.reg ?

  3. #3
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,093
    Thank Post
    457
    Thanked 150 Times in 95 Posts
    Rep Power
    71

    Re: Batch file to remove registry key doesnt work

    Think meastough1 has the easy answer for you.

  4. #4
    ChrisP's Avatar
    Join Date
    Apr 2007
    Location
    norfolk
    Posts
    150
    Thank Post
    4
    Thanked 8 Times in 8 Posts
    Rep Power
    16

    Re: Batch file to remove registry key doesnt work

    Is this part of the kids logon?

    I'm sure you need to be an administrator to write to [HKLM]

  5. #5

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,037
    Thank Post
    209
    Thanked 425 Times in 306 Posts
    Rep Power
    144

    Re: Batch file to remove registry key doesnt work

    Use the following VBS script.
    Code:
    Const HKEY_LOCAL_MACHINE = &H80000002
    
    strComputer = "."
     
    Set objRegistry=GetObject("winmgmts:\\" & _ 
        strComputer & "\root\default:StdRegProv")
     
    strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
    
    strValueName = "ATICCC"
    objRegistry.DeleteValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName
    
    strValueName = "igfxtray"
    objRegistry.DeleteValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName
    The example above removes items from the run at start up area of the registry, but by changing the values in 'StrKeyPath=' and 'strValueName=' you can adapt it to remove whatever registry keys you need.

    Set it as a startup script, not a logon script and it'll work fine (I used it to remove lots of program entries that were running at startup on our workstations, and it worked a treat.)

    Hope that helps,

    Mike.

SHARE:
+ Post New Thread

Similar Threads

  1. Rename a PC from a batch file - Any ideas?
    By MrLudwig in forum Windows
    Replies: 13
    Last Post: 8th December 2007, 02:40 AM
  2. batch file to shutdown PCs
    By macca in forum Windows
    Replies: 5
    Last Post: 3rd May 2007, 09:20 AM
  3. Batch: Text file -> Environment variable?
    By PiqueABoo in forum Scripts
    Replies: 5
    Last Post: 13th December 2006, 11:09 PM
  4. Why doesnt DHCP work as it should in theory?
    By sidewinder in forum Wireless Networks
    Replies: 28
    Last Post: 9th October 2006, 04:46 PM
  5. batch file help
    By beeswax in forum Scripts
    Replies: 9
    Last Post: 3rd March 2006, 07:48 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •