not sure of windows registry function use

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
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
 

samintz

Scott Mintz
May 20, 2008
1,204
11
Solon, OH, USA
#2
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:


> 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\Exp lorer\Shell
> Folders\Favorites = d:\Charles_Favs\Z_INPORT
> set sFavs = @REGQUERY["HKCU\Software\Microsoft\Windows
> \CurrentVersion\Exp lorer\Shell Folders\Favorites"]
> set nDone = @regsetenv["HKCU\Software\Microsoft\Windows
> \CurrentVersion\Exp lorer\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\Exp lorer\Shell Folders\Favorites",REG_SZ,%sFavs]
> iff %nDone ne 0 then
> echo "error ...."
> quit
> endiff
> :: HKCU\Software\Microsoft\Windows\CurrentVersion\Exp lorer\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
>
 
#3
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.