1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

not sure of windows registry function use

Discussion in 'Support' started by Charles G, Nov 10, 2011.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,022
    Likes Received:
    0
    I have the pasted .BTM file and not sure if I have coded the registry access routines correctly; Any chance someone could look them over and just verify please? A huge thank you for anyone willing to. I'd like to use full error checking, etc...

    ======= begin paste
    @echo off

    :: handle all the PFC files in folder given below. Assume no emails in any PFC file.

    pushd "C:\AOL_PFCs\All_Fav_PfCs"

    :: HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites = d:\Charles_Favs\Z_INPORT
    set sFavs = @REGQUERY["HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites"]
    set nDone = @regsetenv["HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites",REG_SZ,%sFavs+"\Z_INPORT"]
    iff %nDone ne 0 then
    echo "error ...."
    quit
    endiff

    for /l %fn in (18,1,1155) gosub :dofile

    set nDone = @regsetenv["HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites",REG_SZ,%sFavs]
    iff %nDone ne 0 then
    echo "error ...."
    quit
    endiff
    :: HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites = d:\Charles_Favs

    popd
    quit

    :dofile
    START /pgm "C:\Program Files\Connected Software\ePreserver Recovery\EreW.exe" /WAIT ^ KEYSTACK enter alt-f shift-tab " " Del Y " " enter alt-n alt-n end up alt-n enter /w5400 alt-x

    RETURN
    ======= end paste
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,190
    Likes Received:
    11
    All your @REGxxx functions are missing a percent sign.

    e.g.
    set sFavs = %@REGQUERY["HKCU\Software\Mic...

    -Scott

    Charles G <> wrote on 11/10/2011 06:25:26 PM:


    Folders\Favorites",REG_SZ,%sFavs+"\Z_INPORT"]

     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    On Thu, 10 Nov 2011 18:25:26 -0500, Charles G <> wrote:

    | :: HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites = d:\Charles_Favs\Z_INPORT
    | set sFavs = @REGQUERY["HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites"]
    | set nDone = @regsetenv["HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites",REG_SZ,%sFavs+"\Z_INPORT"]

    1. Do not surround '=' with spaces when using SET. (SET sFavs=%@REGQUERY[...])

    2. In the last line above, what is the '+' for? If you intend to concatenate
    the two strings, use (simply) %sFavs\Z_INPORT

    I didn't read further.
     

Share This Page