Ask Your Question
0

replace running windows process using file resource

asked 2013-04-17 09:57:45 -0500

czervik gravatar image

updated 2013-04-17 09:58:43 -0500

I have a small Windows daemon that runs in "user space". Currently, it is distributed as two file resources. One puts the executable where it needs to live. The other puts a shortcut to the first file in startup menu. Now I'm trying to push a new version of the daemon.

Putting the new exe in Puppet may lead to permission denied errors because Windows doesn't let you overwrite the currently running process. I can run an exec that kills the process easy enough, but am not sure how/if I can wire this up right using standard ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-17 15:06:05 -0500

Using the file resource to do what a package resource should do is not where you want to be. I would recommend packaging the exe into a msi, chocolatey, or exe. Typically a puppet repo files are stored in version control, and binaries are frowned upon. The file resource is typically used for the "config" text files.

If this is a one off, scenario I might look to http://stackoverflow.com/questions/310418/good-resources-for-learning-how-to-create-msi-installers-from-wix vs a full blown package management solution.

The last resort solution, if you want to avoid puppet, to get the binary on the host use powershell ... (more)

edit flag offensive delete link more

Comments

In theory I agree. Packaging doesn't always make things easy on Windows. I upgrade a large MSI via a custom type (everything in Ruby including download resumes, checksum, etc ...(more)

czervik gravatar imageczervik ( 2013-04-17 16:03:42 -0500 )edit

btw, I upvoted, because this is a good answer :) thanks for the wix link too.

czervik gravatar imageczervik ( 2013-04-17 16:11:44 -0500 )edit

this seems to be similar to what you are trying to accomplish http://projects.puppetlabs.com/issues/3537

rismoney gravatar imagerismoney ( 2013-04-17 19:12:17 -0500 )edit
rismoney gravatar imagerismoney ( 2013-04-17 19:19:56 -0500 )edit

yeah. Whether the use case is a good one, there's no way to express this sort of relationship in puppet DSL AFAICT. I hacked something together with several execs ...(more)

czervik gravatar imageczervik ( 2013-04-17 19:56:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-04-17 09:57:45 -0500

Seen: 210 times

Last updated: Apr 17 '13