Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#156709 - 22/04/2003 23:31 Where is file-replace information stored?
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Back in the good old days of Windows 95, when your installer needed to replace a file that was "locked" in use by Windows, it would write an entry to the file WININIT.INI with the replacement instructions. So if you installed a program and the program said "Would you like to reboot your computer now?" you could open WININIT.INI and see what it was going to change on the next reboot.

Windows NT and later has an updated mechanism for doing the same thing which doesn't use WININIT.INI. When I write an installer in InstallShield, this aspect of it is handled automatically by the InstallShield engine, but I never knew what it was doing under the hood. Does anyone know how this is being done? Is it writing a registry entry? If so, what's the key?
_________________________
Tony Fabris

Top
#156710 - 23/04/2003 00:00 Re: Where is file-replace information stored? [Re: tfabris]
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
Not sure, but it probably uses the RunOnce key. See here.


Edit:

Actually, this is more relevant.

"Windows 95 puts all of its rename operations into the file Wininit.ini. Windows NT puts the rename operations into a Registry value named “PendingFileRenameOperations”. "



Edited by ricin (23/04/2003 00:04)
_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top
#156711 - 23/04/2003 00:06 Re: Where is file-replace information stored? [Re: ricin]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Sorry, forgot to clarify...

I'm not talking about programs that get run after Windows starts. I know all the places where a program can get run. I'm talking about the built-in windows mechanism for replacing files before Windows starts, before it hits the Run keys, before the Load= and Run= sections of Win.ini, before the StartUp group. Before even the Windows GUI loads.

In Windows 95/98, this is the place where you sometimes see the text "Finished updating files, continuing to load Windows" appear. Of course, in that case, it's using WININIT.INI, because that message never appears in NT-based operating systems.

They replaced the functionality of WININIT.INI when they did NT 4.0 and later, there's something it's doing that's pretty much the same thing, and it doesn't have to run a third-party program to get the job done, it's built in to Windows. I just don't know where it is exactly.
_________________________
Tony Fabris

Top
#156712 - 23/04/2003 00:09 Re: Where is file-replace information stored? [Re: tfabris]
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
Yeah. I read it a little too fast the first time and didn't catch everything you were saying. I quickly edited though.
_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top
#156713 - 23/04/2003 00:10 Re: Where is file-replace information stored? [Re: ricin]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
Windows NT puts the rename operations into a Registry value named “PendingFileRenameOperations”.
AH! That's what I was looking for. THANKS!!!

(any idea which subkey it's located in?) <-Never mind, they have example code at that link.
_________________________
Tony Fabris

Top
#156714 - 23/04/2003 00:14 Re: Where is file-replace information stored? [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
For posterity, it's HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager with a key name of PendingFileRenameOperations .
_________________________
Tony Fabris

Top
#156715 - 23/04/2003 03:20 Re: Where is file-replace information stored? [Re: tfabris]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
If you're planning on adding files to that list, you should use MoveFileEx, rather than hacking on it directly. If it's just for diagnosis, then fair enough.
_________________________
-- roger

Top
#156716 - 23/04/2003 10:25 Re: Where is file-replace information stored? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
If you're planning on adding files to that list, you should use MoveFileEx, rather than hacking on it directly. If it's just for diagnosis, then fair enough.
Agreed completely. I only wanted to know for diagnosis purposes.

See, sometimes I install a program which asks me to reboot, and the truth is that it really didn't need me to reboot. The authors of the installer just added the Reboot box at the end of their installer to make sure that their users were running their program the first time on a freshly rebooted system... to reduce support calls. Either that, or they just didn't understand how the reboot feature works in the installer, and they checked the "reboot" box in their creation wizard. In those cases, I can check and see it really didn't anything, so that way I don't have to disconnect from all the network-related stuff I'm doing and reboot, I can just run the program.

And if there's something that really does need to get replaced, I usually like to know what it was. I have other tools that let me see every single change a given installer made to the system, but they are overkill when all I want to do is satisfy my occasional curiosity.
_________________________
Tony Fabris

Top