Ask Your Question

replace running windows process using file resource

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

czervik gravatar image

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

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

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

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 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


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 -0600 )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 -0600 )edit

this seems to be similar to what you are trying to accomplish

rismoney gravatar imagerismoney ( 2013-04-17 19:12:17 -0600 )edit
rismoney gravatar imagerismoney ( 2013-04-17 19:19:56 -0600 )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 -0600 )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


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

Seen: 227 times

Last updated: Apr 17 '13