PDA

View Full Version : Variables In Registry Actions


Waza04
09-24-2004, 10:12 AM
Hello,
It seems that variables arnt being converted :(

Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\MyProduct\\SystemSettings", "InstallVersion", "%ProductVer%", REG_SZ);

The installer writes %ProductVer% to the registry and not my actuall product version...

Thanks,
Warren

Lorne
09-24-2004, 10:17 AM
Session variables need to be expanded when used in actions, like so:

Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\MyProduct\\SystemSettings", "InstallVersion", SessionVar.Expand("%ProductVer%"), REG_SZ);

Waza04
09-24-2004, 10:22 AM
HeHe Cool...

Still tryna get to grips wit this new SF7 coding style... :)

Cheers