Question : Getting the path to msaccess.exe

When I run this code I get the following result:

Path    REG_SZ  C:\Arquivos de programas\Microsoft Office\Office\
Pressione qualquer tecla para continuar. . .

What should I change in the code so that i get just the path?
Thanks in advance for any help
Code Snippet:
1:
2:
3:
4:
5:
@ECHO OFF
ECHO.
FOR /F "TOKENS=* DELIMS= " %%i IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App paths\MSACCESS.EXE" /v Path') DO (SET CR_PATH=%%i)
ECHO %CR_PATH%
pause
Open in New Window Select All

Answer : Getting the path to msaccess.exe

The modified script below skips the first four lines of output and then removes the first 11 characters from the resulting variable.

See here for more information:
http://www.ss64.com/ntsyntax/varsubstring.html

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
@echo off
setlocal
 
echo.
 
for /F "tokens=* skip=4" %%G in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App paths\MSACCESS.EXE" /v Path') do set CR_PATH=%%G
 
set CR_PATH=%CR_PATH:~12%
echo %CR_PATH%
 
pause
Open in New Window Select All
Random Solutions  
 
programming4us programming4us