On Wednesday, January 30, 2013 5:16:24 AM UTC-6, Jason_s
wrote:>
> Hi puppeteers,
>
> We have an issue being able to run REGSVR32 /u before a file is to be
> changed to de register it with the Windows Registry.
>
> The run the register afterwards part is fine, as we can use the subscribe
> /notify structure.
>
> What is your advice for this scenario?
>
I suppose that you only want to unregister the file if it already exists
and needs to be updated. That is extremely difficult with Stock Puppet,
because one resource cannot determine whether another is out of sync. If
you have to do as you describe directly via Puppet, then you probably need
to create a custom provider for the File resource type. You can probably
extend the existing Windows provider to add both the unsubscribing and the
subscribing.
I urge you to consider alternatives, however. In particular, a file that
needs to be registered smells like something that should be part of a
package. If it were, then you could rely on the package''s installation
scripts to handle registration and deregistration.
John
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.