Page 1 of 1

Conditionally writing registry keys

Posted: Mon Jan 08, 2007 2:35 am
by swmotif
Hello,

InstallAware Developer does everything I need except I can't figure a way to conditionally write registry keys. If the key exists, I don't want to overwrite the factory default value.

I haven't tested this to see if the presence of the key makes the install doesn't overwrite, but is there a way to acoomplish this?

Posted: Mon Jan 08, 2007 12:34 pm
by CandiceJones
Easy - just use Read Registry or Check Registry to see if the key exists, and then use an If...End block to prevent writing your own keys if so.

Posted: Fri Jan 12, 2007 11:57 am
by ken rentz
CandiceJones wrote:Easy - just use Read Registry or Check Registry to see if the key exists, and then use an If...End block to prevent writing your own keys if so.


Could I request an enhancement that would add this checking to the internals of the write command? We have a legacy application that has about 350 registry items. Adding the wrapper via scripting makes the script rather large and very hard to read. Most programs are not this bloated in the registry, but I've always found that multiple, single line if commands annoying to work with.