Get Internet Explorer download folder
Posted: 15 Sep 2010 17:15
Hi Guys,
I'm trying to store IE download folder into a variable.
The following code works in vista but not in XP
(vista "cuts" the spaces, XP shows the path with preceding spaces)
Can anyone please help me get it right?
@ECHO OFF
FOR /F "tokens=2* delims=REG_SZ " %%A IN (' REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer" /v "Download Directory" ') DO SET directory=%%B
echo %directory%
Thanks
I'm trying to store IE download folder into a variable.
The following code works in vista but not in XP

(vista "cuts" the spaces, XP shows the path with preceding spaces)
Can anyone please help me get it right?
@ECHO OFF
FOR /F "tokens=2* delims=REG_SZ " %%A IN (' REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer" /v "Download Directory" ') DO SET directory=%%B
echo %directory%
Thanks