Format %APPDATA% value so it can be used as a registry value
Posted on 2003-10-29
I am making a custom config batch file to for setting up user computers. I need to pull the users %APPDATA% directory and put it into a Regkey value. I figure I need to use something like this to add the extra "\" in the address so that it will work in the registry:
for /f "delims=\" %%f in ("%APPDATA%") Do call :ProcessAddress
If not "%1"=="" (
Set APPdir=%APPdir% %APPdir
But this doesn't seem to work correctly. Anyone know the correct way to do this?