WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Installation Licensing Setup
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Overwrite System Files during Installation

Keywords:        system files in use

Question:

I am writting a install script. I need to replace several system DLLs. When I try to copy down the updated files the script stops because it can not overwrite a file in use.

Answer:

  1. Every install package I have yet seen does not try to copy over system files without a reboot.

    After deciding to update the DLLs... most people do something like copy the files to the temp directory on the local drive, then create/update the wininit.ini file in the local windows directory, such that the system files are moved onto the system files (replacing them) AFTER bootup but BEFORE Win95 starts.

  2. Copy them down to the same directory but with different names. Maybe just a DLX extension (instead of DLL).

  3. To determine Windows NT platform, see WinMetrics(-4).

  4. Use IntControl 30 instead of FileCopy. Works especially well on NT machines.

  5. To reboot machine, See IntControl(67...).

  6. For Windows 95: Construct a WININIT.INI file in the Windows directory.

    It should look like:

    
    ;------snip------
    [rename]
    realname1=tempname1
    realname2=tempname2
    realname3=tempname3
    ;-------snip-------
    

    Note both the old and new new names should be FULLY QUALIFIED SHORT filenames. (See FileNameShort)

  7. Then reboot. See IntControl(67 ...).

Article ID:   W13404
Filename:   Overwriting In Use System Files during Install.txt
File Created: 1999:04:15:16:53:48
Last Updated: 1999:04:15:16:53:48