Archive: How to left ALL files overwrite on reboot?


How to left ALL files overwrite on reboot?
Hi All,

Installer try to overwrite some files during setup. A new version of file "A" depends on new version of file "B". If we update first file "A" we MUST update second file "B" -otherwise application will be crashed :(
But "B" may by in use and "A" - not. We overwrite ONLY "A" just now and get crashed app :(

Only one desision : overvrite ALL files on reboot (RebootOK options) in ONE transaction.

How to left ALL files (in use, not in use - doesn't matter) overwrite on reboot?


Re: How to left ALL files overwrite on reboot?

Originally posted by romko
Hi All,

Installer try to overwrite some files during setup. A new version of file "A" depends on new version of file "B". If we update first file "A" we MUST update second file "B" -otherwise application will be crashed :(
But "B" may by in use and "A" - not. We overwrite ONLY "A" just now and get crashed app :(

Only one desision : overvrite ALL files on reboot (RebootOK options) in ONE transaction.

How to left ALL files (in use, not in use - doesn't matter) overwrite on reboot?
Hi Romko,

you best best, I think, is to copy file A and B under different name, A2 and B2 for example, and try to rename them to A and B with the /REBOOTOK flag.

It may do the trick if read the Rename instruction entry in the documentation correctly. ;) Please, let me know if it works.

Hope this helps,

KenA

Re: Re: How to left ALL files overwrite on reboot?

Originally posted by KenA
Hi Romko,

you best best, I think, is to copy file A and B under different name, A2 and B2 for example, and try to rename them to A and B with the /REBOOTOK flag.

It may do the trick if read the Rename instruction entry in the documentation correctly. ;) Please, let me know if it works.

Hope this helps,

KenA
Hi KenA,

For example A - in use, B - not in use
create ne files A2 B2
rename /rebootok A2 A
rename /rebootok B2 B
B will be overwrite just now, A - will be overwrite ON REBOOT. I need overwrite A and B file TOGETHER ON REBOOT

If it isn't possible to force it to do both the Rename's on reboot, then you could create a temp batch file in the $TEMP folder, and write to Software\Microsoft\CurrentVersion\RunOnce (with WriteRegStr) so when Windows boots up next time it will run the batch file once only and do the updates.

However, this probably won't work if your program is in use as Windows boots up...

-Stu


Re: Re: Re: How to left ALL files overwrite on reboot?

Originally posted by romko
Hi KenA,

For example A - in use, B - not in use
create ne files A2 B2
rename /rebootok A2 A
rename /rebootok B2 B
B will be overwrite just now, A - will be overwrite ON REBOOT. I need overwrite A and B file TOGETHER ON REBOOT
Hi romko, pardon my asking, but did you try ? ;)

KenA

Re: Re: Re: Re: How to left ALL files overwrite on reboot?

Originally posted by KenA
Hi romko, pardon my asking, but did you try ? ;)

KenA
Hi KenA,

It was my mistake about RENAME using :) RENAME doesn't check file locking, it checks exist file or not and left all file on reboot if they exists. What I want :)