Results 1 to 4 of 4

Thread: Registry value per batch editing - Windows XP error

  1. #1
    Join Date
    Oct 2005
    Posts
    82

    Registry value per batch editing - Windows XP error

    Hello,

    I would like the value of a registry keys using a batch file to edit. It already contains and may not be overwritten. They must be maintained and I would like to add something.
    The problem is the existing value on each machine is the same, however, it is the added.

    I approached the value of the Keys which was reading out it in a store variables and a new variable to define the variables from the old and the new value is composed.

    So looking from the batch so far:

    Code:
     @ echo off 
     
      set RegHotfixListe = "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Test" 
      set HotFixNr = 
      set new =; Value2 
      set f =  
     
      for / F "delims = \ tokens = 7"%% f in ( 'reg query "% RegHotfixListe%" / v name 2 ^> NUL ^ | findstr "name"') do "%% f" 
      set HotFixNr =% f%%% new 
    
      reg add "RegHotfixListe%%" / v name / t REG_SZ / d "%% HotFixNr" / F 
    
      break
    Problem is the existing value does not read, or not in the variable will be stored. Find findstr instead, I had already tried initially. So I have the key "test" only "; Value2" and the already existing has been overwritten.

    According to research, it should actually do so, but it will not. I am on the boardwalk or the script is just a small mistake?
    "Freely you have received, freely give." -- Jesus Christ

  2. #2
    Join Date
    Dec 2007
    Posts
    1,599

    Re: Registry value per batch editing - Windows XP error

    Easy way: just try out, if you're in reg query "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Test" | findstr "name" ever get out the value that you are looking for. I'm getting there even with no value back.

    With reg query "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \" Although I get a lot of information, but I've no subkey with the name test. Use I think so: | find / i "name" I get a result back, at least in the Reg-Key, where I just try.

  3. #3
    Join Date
    Oct 2005
    Posts
    82

    Re: Registry value per batch editing - Windows XP error

    Code:
    C: \ WINDOWS> reg query "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVe 
      rsion \ Test "| findstr" name " 
          name REG_SZ; Nokia 
    
      C: \ WINDOWS>
    I have the keys and key extra-created course, as exists in Windows do not. find / i is the same.
    So I have read the works already, but the saving is in the variable.
    "Freely you have received, freely give." -- Jesus Christ

  4. #4
    Join Date
    Dec 2007
    Posts
    1,547

    Re: Registry value per batch editing - Windows XP error

    What do you want to
    Code:
    do "%% f"
    achieve?

    How about

    Code:
    for / F "delims = \ tokens = 7"%% f in ( 'reg query "% RegHotfixListe%" / v name 2 ^> NUL ^ | findstr "name"') do ( 
      set HotFixNr =% f%%% new

Similar Threads

  1. Has anyone tried editing the registry of Nokia Lumia 800?
    By Ash^Bi in forum Portable Devices
    Replies: 6
    Last Post: 27-11-2011, 08:37 PM
  2. Windows Mobile 6.5 registry editing
    By MadhaviS in forum Portable Devices
    Replies: 6
    Last Post: 09-08-2010, 04:21 PM
  3. Server config file - batch editing script
    By ranjankumar09 in forum Windows Software
    Replies: 3
    Last Post: 28-01-2010, 10:30 PM
  4. enable registry editing in Windows XP
    By Dolla in forum Operating Systems
    Replies: 3
    Last Post: 26-06-2009, 02:38 PM
  5. Replies: 1
    Last Post: 19-08-2008, 01:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,244,781.49175 seconds with 17 queries