![]() |
Background Processes On Windows (Saturday, September 11th, 2010) | ![]() |
![]() |
Sometimes Windows makes me want to kill myself. It was a simple enough idea: I've got a task to be performed, which can take anywhere from several seconds to a minute or two. I want to activate it from a web page, and display a progress bar to the user. To make this work on the web, of course, this means the initial request has to spawn a background process and terminate, then I'll use AJAX to make subsequent calls to another script that checks on the progress, and update the progress bar every couple of seconds. It's a little more complex than you might expect, if you're not familiar with web development. But on UNIX-based systems, it's really not that complicated. Unfortunately, I needed to do this on a Windows server. It turns out that Windows doesn't have anything equivalent
to Eventually I downloaded the PsTools
package from SysInternals, and was able to use There was just one other minor hurdle: even though I set
In the end, I got it working, and the resulting progress bar works perfectly. It was quite an adventure in frustration and annoyance, but now I know what to expect if I ever need to do something like this again. |
![]() |
![]() |
![]() |
![]() |
![]() |
Themes | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Random Quote | ![]() |
![]() |
“If you want to make a system that doesn't care about compatibility, you
may have more freedom. Of course, with that freedom comes the fact that
nobody actually wants to use your system, which gives you even _more_
freedom, since then you don't have to worry about those pesky users and
their real-life problems.”
- Linus Torvalds |
![]() |
![]() |
![]() |
![]() |