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.

Using WININIT.INI to Install Files after Reboot in Windows 95

Keywords:      WININIT.INI   WININIT.EXE

Question:

I have used winbatch to supply a file run and patch to install an application as a mail attachment. When the application starts to setup by installing in this fashion the following DLL error message appears:
	msvcrt.dll is in use ignore retry abort
Winbatch is launching a setup program. What I think is happening is that winbatch is not being released until after the setup program completes. Is there away to release winbatch while the setup program is running?

Answer:

Depends? How are you launching the Setup program from WinBatch?

With RUN, WinBatch will continue and presumably exit.

With RunWait, WinBatch will wait for the setup program to exit...

Basically the mscvrt.dll file is in use, possibly by WinBatch or another application.

Since the file already exists, chances are it does not need to be updated. If you can modify the setup program to skip that file, or skip it if it exists, then stuff might start to work.

I'm not clear on how much of the setup WinBatch does, or some other setup program does, or how much control you have over the situation.

Basically it appears you have to do some kind of special handling for that file.

Most install programs copy files that are in use to the hard drive and then on re-booting copy over the existing file.

To do this in WinBatch:

  1. In NT, there is IntControl(30....) that can do a delayed file copy. Basically you copy the file to the disk with a different name, and on reboot it takes care of it.

  2. In Windows 95 there is a WININIT.INI file that takes care of this. (Note that the WININIT.INI file is NOT an INI file (be careful) and as such cannot be reliably written to via the iniwritepvt function)

    If you look at the WININIT.INI and .BAK files in your Windows directory you can figure out how this works.

    If it is WinBatch trying to overwrite the DLL is use, we can handle it, but if it is another setup program trying to do it, some other solution must be found.

    You can use WININIT.EXE. If you create a file called WININIT.INI in the Windows directory, files listed will be renamed during bootup. An example would be:

    [rename] 
    C:\Fred\Fault.exe=C:\Fred\Fault.1 
    
    to delete a file use:
    [rename]
    NULL=C:\Fred\Fault.exe
    
    Note: I believe the syntax is destination = source. Looks kind of backwards. Also, this doesn't support long file names.

Article ID:   W13413
Filename:   Using WinINIT.INI to Install Files after Reboot.txt
File Created: 1999:04:15:16:53:52
Last Updated: 1999:04:15:16:53:52