Click here to Skip to main content
15,912,204 members
Home / Discussions / System Admin
   

System Admin

 
QuestionRun batch file in IIS6 Win2003 Pin
VK-Link15-Dec-05 4:05
VK-Link15-Dec-05 4:05 
AnswerRe: Run batch file in IIS6 Win2003 Pin
VK-Link15-Dec-05 5:49
VK-Link15-Dec-05 5:49 
QuestionWorking of Windows Update Pin
HakunaMatada13-Dec-05 22:16
HakunaMatada13-Dec-05 22:16 
AnswerRe: Working of Windows Update Pin
Ray Cassick14-Dec-05 6:42
Ray Cassick14-Dec-05 6:42 
GeneralRe: Working of Windows Update Pin
HakunaMatada14-Dec-05 17:10
HakunaMatada14-Dec-05 17:10 
GeneralRe: Working of Windows Update Pin
Ray Cassick14-Dec-05 17:30
Ray Cassick14-Dec-05 17:30 
GeneralRe: Working of Windows Update Pin
HakunaMatada14-Dec-05 17:58
HakunaMatada14-Dec-05 17:58 
GeneralRe: Working of Windows Update Pin
Ray Cassick14-Dec-05 18:16
Ray Cassick14-Dec-05 18:16 
Aw shucks Smile | :)

If you are creating the installer for your application part of that will have to be knowing how to handle cases where you try to copy a file over where one exists already and get an error showing that it is already in use. This is why installers tell people that they need to reboot after installing an update, to allow the files to be copied upon reboot before the application has been started up again.

This is typically done by the installer writing a small batch file on the fly that shows where files need to be copied (and from where - like a temp area) then placing a reference to the batch file into the Windows registry in the RunOnce key. The idea behind this key is that any executable file listed here is run on the next reboot, but Windows knows that (because it is called the RunOnce key) that once this file is run the reference to it is removed (so it is not run again, and again, and again...)

Doing all this is something that you need to manage in what ever tool you use to write your installations. Usually tools like Installshield and such handle this for you.

You could also have the installer look to see if the application is it trying to update is running and then either warn the user to close it first and retry the install or just close it yourself and restart it when your installer is done.

Until Windows Vista arrives, no matter what you do you will always have to deal with files that are in use and figure out what to do. Vista will have some things in place to handle this a bit better so you should not have to reboot as much as you do now, but until then you are on your own as to what to do. Depending on what you are updating (user level application or a system service or device driver) you will need to deal with files that are in use.

Personally, if you are updating something like a system service you can always just tell the user that you have to stop the service to do the update, then use the SCM APIS to stop the service, install the new files and then restart the service. Just keep in mind things like user security levels (The person running the update might not have the same security access as the person that installed the service in the first place so you might not be able to do this.

When I do updates, if I am just updating one file I only write that one file to keep the installer small. I know other people that install an entire new version of the application and only change one file. Again, it is up to you.

Good luck...



George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.

My Blog[^]


GeneralRe: Working of Windows Update Pin
HakunaMatada14-Dec-05 18:38
HakunaMatada14-Dec-05 18:38 
GeneralRe: Working of Windows Update Pin
Ray Cassick14-Dec-05 18:51
Ray Cassick14-Dec-05 18:51 
GeneralRe: Working of Windows Update Pin
HakunaMatada14-Dec-05 18:55
HakunaMatada14-Dec-05 18:55 
GeneralRe: Working of Windows Update Pin
Ray Cassick14-Dec-05 19:13
Ray Cassick14-Dec-05 19:13 
GeneralRe: Working of Windows Update Pin
HakunaMatada14-Dec-05 19:23
HakunaMatada14-Dec-05 19:23 
QuestionPerfMon: Where are my counters? Pin
Salil Khedkar12-Dec-05 23:49
Salil Khedkar12-Dec-05 23:49 
QuestionRecord user sending mail Pin
Mekong River12-Dec-05 22:09
Mekong River12-Dec-05 22:09 
AnswerRe: Record user sending mail Pin
Saksida Bojan14-Dec-05 19:58
Saksida Bojan14-Dec-05 19:58 
GeneralRe: Record user sending mail Pin
Mekong River14-Dec-05 20:30
Mekong River14-Dec-05 20:30 
QuestionNIS Pin
MatthysDT12-Dec-05 18:55
MatthysDT12-Dec-05 18:55 
AnswerRe: NIS Pin
Dave Kreskowiak12-Dec-05 19:47
mveDave Kreskowiak12-Dec-05 19:47 
GeneralRe: NIS Pin
MatthysDT12-Dec-05 19:51
MatthysDT12-Dec-05 19:51 
QuestionPrinter driver surfaces Pin
loneadam200012-Dec-05 5:08
loneadam200012-Dec-05 5:08 
QuestionApplying group policy Pin
Krishnan V11-Dec-05 19:20
Krishnan V11-Dec-05 19:20 
AnswerRe: Applying group policy Pin
Dave Kreskowiak12-Dec-05 6:09
mveDave Kreskowiak12-Dec-05 6:09 
AnswerRe: Applying group policy Pin
Saksida Bojan12-Dec-05 18:48
Saksida Bojan12-Dec-05 18:48 
QuestionAbout Indexing Pin
Member 207314111-Dec-05 18:15
Member 207314111-Dec-05 18:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.