17

Jun

2009

Retrieve a value from the registry in dos variable PDF Print E-mail
Here is a small line of code to retrieve the registry location of the folder "My Documents":
1
2
FOR /F "tokens=2*" %%A IN ('reg.exe QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Personal') DO SET MesDocs=%%B
ECHO %MesDocs%

 

result:

1
C:\Documents and Settings\vlyan\Mes documents

 

We can easily reuse this code for other registry keys

 
French (Fr)English (United Kingdom)
Aug.10

French Custom UI

Left4Run 1.0.1
Apr.09

Graphic launcher for Left4Dead

Nov.08

Lanceur graphique pour les serveurs DoL.

Nov.08

Programme alternatif au ComponentChooser pour les personnes ayant le .net et ne voulant pas insta...