PDA

View Full Version : Service self-update on re-boot


Sten Westerback
08-11-2003, 05:37 AM
"Andy Bray" <andy@abconsulting.com> wrote in message
news:%y_Fa.506$95.406@newsr2.u-net.net... Hello I have created a service that has the ability to check for newer versions
of itself. If a newer version is available, I want the service to update itself. I've tried using the MoveFileEx(pszExisting, pszNew, MOVEFILE_DELAY_UNTIL_REBOOT) functions which has always worked for me in
the past. But for some reason, it doesn't work for a service. Is it because services are started before the system performs the
MoveFileEx operations at start-up? If so, can anyone think of a way to do this.

Start a child application that wait for your service to exit, then replaces
the files and
finally asks the SCM to restart the service (unless you want to wait for OS
to do
automatic restart of the service).

Not that i can see why it wouldn't work for a service if the account that
you run the service with has the appropriate permissions to the Registry
keys involved. Are you sure you specify full paths that are valid at boot
time?

- Sten


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service