Jump to content

Recommended Posts

Posted (edited)

I have created an automated installation of Windows 98 SE and want to make it replace the standard AUTOEXEC.BAT and CONFIG.SYS files with custom versions located in the directory of SETUP.EXE. In order to achieve this, I have modified the MSBATCH.INF file in the following way:

[Install]
...
CopyFiles=StartupFiles

...

[StartupFiles]
AUTOEXEC.BAT
CONFIG.SYS

...

[DestinationDirs]
...
StartupFiles=24

24 is the DirId of the root directory of the drive containing the Windows folder (for my installation, this is "C:\").

Unfortunately it didn't work. After Setup had completed, I tried to "manually" launch the CopyFiles directive: I added another section to MSBATCH.INF (which had been copied to "C:\WINDOWS"):

[Copy.StartupFiles]
CopyFiles=StartupFiles

Then I executed the following command using Start - Run:

C:\WINDOWS\rundll.exe setupx.dll,InstallHinfSection Copy.StartupFiles 4 C:\WINDOWS\msbatch.inf

It worked! Does anyone know, why it doesn't work during Windows Setup ? Could it be possible that the CopyFiles directive is processed before the standard installation files are copied, causing my custom versions of AUTOEXEC.BAT and CONFIG.SYS to be overridden by the standard versions ? This seems quite unlikely to me, because the DelFiles and RenFiles directives, which could also be used in the [install] section, wouldn't make much sense if the files they are applied to didn't already exist.

Edited by asmfreak

Posted (edited)
custom versions located in the directory of SETUP.EXE

I think that's enough. You don't have to add strings to your MSBATCH.INF! This method applies to files installed by Windows SETUP, only.

That's what I, personally, do. I didn't test those two files, especially, however.

<EDIT>

Oh, and there's a good place for that: http://www.msfn.org/board/index.php?act=SF&s=&f=8

Edited by mazin

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...