AFAIK, Windows does not have a true "fork" capability.  Here are some ideas
that might help:

- Use srvany (or something else) to define a custom service.  It sounds
like this is probably what you really should be doing anyway.  Puppet is
not meant to control programs over a long term (i.e. services), it's meant
to setup other things that control them.  The Windows service framework is
meant to do that.

- Create a schedule task to run your command

- Use the "start" command to start the process.


❧ Brian Mathis
@orev


On Fri, May 30, 2014 at 12:11 PM, Bill N <[email protected]> wrote:

> Hi,
>
> Just wrote my first puppet module for Windows  provisioning. All is
> working well except I am having a problem running a windows exe file in
> that Puppet appears to wait for the exe to complete. At least this is the
> case when I run Puppet agent --test from the Windows Server command line.
>
> What I want to do here is install a set of files for a Riemann monitoring
> client on several Windows Server 2008 R1 VMs. These files include an exe,
> which I want to start and run in perpetuity. I don't want Puppet to wait
> for this process to complete. It appears I could run the exe in a separate
> shell using cmd.exe, but when I try that on the command line I do not see
> the named process running in the Resource Monitor. I only see cmd.exe
> running. This is not very informative.
>
> My question is, what is the best way to run this executable via Puppet?
> Should I convert the exe to a Windows service, install that and run it as a
> service? Should I use shell cmd and live with the unhelpful Resource
> Monitor listing? Or should I use Power Shell to fork the process like I
> would in linux?
>
> Any help would be most appreciated.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/07c840a9-4c52-4b99-b24c-ffc10c1f19a9%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/07c840a9-4c52-4b99-b24c-ffc10c1f19a9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CALKwpEwEOoTvVcPRypNSHF%3DZGkw6o6SwtRe_Eafz0uJ6Pzk7ug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to