Wrong. The double % allow to keep variable in registry with /t REG_EXPAND_SZ type. With one %, the value become hard coded. But in fact, it's not a problem if it's hard coded because after batch execution program files path doesn't change. I think the best solution it's batch file which pass hard coded path of program files to reg.exe. it worked..tnx