I am making a little mod for the old game sims 1, and i thought i make a simple batch file for installing it, just to be fancy. anyway, in the registry you can find the inst
Sounds like you need to call reg.exe
The accepted answer on 771240 looks to have the syntax you'll need. I've not tested this, but it should look something like
Set Reg.Key=HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims
Set Reg.Val=InstallPath
For /F "Tokens=2*" %%A In (
'Reg Query "%Reg.Key%" /v "%Reg.Val%" ^| Find /I "%Reg.Val%"' )
Do Call Set simsdir=%%B
echo %simsdir%
edit
Maybe try it with the for all on the one line, that's the only way I could get it to work. I'm a bit rusty on the 'ol batch files though
Set Reg.Key=HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\The Sims
Set Reg.Val=InstallPath
For /F "Tokens=2*" %%A In ('Reg Query "%Reg.Key%" /v "%Reg.Val%" ^| Find /I "%Reg.Val%"' ) Do Call Set simsdir=%%B
echo %simsdir%