Posted 25 April 2005 - 13:55
Here's the reason I want to do this in script. We have a script that accepts a registration code. From that code we parse certain information, set public properties based on that information, and condition installation of some features based on those properties.
Let's say I wanted to write a Registry value of 1 if a Feature is installed. If the registration code warrants, the Feature and contained components are placed and the Registry entry is written as desired (the registry is tied to one of the contained components). Now if the feature is not placed, the Registry entry is not written, which is OK too.
If I need to, in the future, I can check for the existence of the above discussed Registry entry.
My problem comes in when the user may no longer pay for that feature/component, we don't remove if from the system. The condition for installation is placed on the Feature and not the component so I don't know how to re-evaluate the condition on the component so it would be removed along with its previously written Registry entry.
We did it this way because in the past, there was a problem with component conditions in the Win 9X world, so we just stuck to that method.
So if the user no longer uses the above described feature, the registry entry will still remain so I can't accurately determine if the user is still using it or not based on the existence of this Registry entry.
I was thinking I could just change the values of the Registry key via script based on our registration code values.
In a round-about way, that is why I was wondering about scripting the changes.