VOGONS

Common searches


First post, by ArthurDent42

User metadata
Rank Newbie
Rank
Newbie

Is it possible to script a batch file to alter the system settings of a Windows 3.1 install (such as setting a particular display resolution?) I am aware that you can accomplish this through the "Setup Windows" option in the "Main" program category within Windows itself, or by running "setup" in Dos from within the windows install directory. But neither of these methods can actually be scripted to alter specific settings to specific values, they're both reliant on the end-user providing contextual input once the settings dialog launches.

My issue is that I have a whole lot of Win3.1 games setup to autolaunch Windows when run, but many of them require specific system settings to work properly (display resolution and color depth in particular). As it stands I launch each game with a separate Windows install customized for that particular game's needs, which is a lot of wasted space in aggregate. If I could batchscript specific changes to the Windows System Settings (ie: set Display to 640x480, 256 Colors) I could then use a single clean Windows Install, changing the settings on the fly and symbolic linking in any files the game added/modified during install.

My ideal process would go something like:
Game Install:

  1. Duplicate Clean Windows Install
  2. launch windows from duplicate directory
  3. run file-changes monitor (pointed at duplicate directory) in either Windows, DOS, or host OS
  4. install game
  5. exit windows
  6. Delete all files with matching checksum before and after install (preserving directory structure for all files kept)
  7. this results in one unmodified clean-Windows install folder and one folder full of files modified/added during the specific game installation

Game Launch:

  1. Trigger bash script launching game
  2. Bash script symbolic links game install files with corresponding sub-directory structure to clean windows directory
  3. Bash script launches DosBox with game-specific conf
  4. conf autoexec mounts C:
  5. conf autoexec sets Windows display setting to appropriate configuration
  6. conf autoexec runexit's Windows with the game in question
  7. conf autoexec exits DosBox

This would allow me to store just one clean Windows install for each version I use, and bundle just the files installed/modified during install with each game, saving on space considerably.


* I'm not sure if this should properly go in the DosBox or Old Software section of the site since my question generally seems to apply to both, so I apologize if this post is in the wrong place.

Reply 1 of 5, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie

Keep several variants of SYSTEM.INI, each configured for different mode, and in the .BAT something like "copy 640x480.ini c:\windows\system.ini"...

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 2 of 5, by ArthurDent42

User metadata
Rank Newbie
Rank
Newbie
Grzyb wrote on 2023-11-11, 17:15:

Keep several variants of SYSTEM.INI, each configured for different mode, and in the .BAT something like "copy 640x480.ini c:\windows\system.ini"...

@Grzyb: Thanks! This is exactly what I was looking for - I'm a linux head, and while "everything is a file" serves you well as a rule of thumb in Unix-like land, I couldn't for the life of me figure out whether Windows 3.1 stored settings in some kind of registry unexposed to the filesystem or as a basic .ini or some such. Should have just went trawling through the system.ini! Either way you've helped me out quite a bunch.

Reply 3 of 5, by weedeewee

User metadata
Rank l33t
Rank
l33t

fyi, even the windows registry is a file.

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 5 of 5, by ArthurDent42

User metadata
Rank Newbie
Rank
Newbie
Azarien wrote on 2023-11-14, 15:37:
weedeewee wrote on 2023-11-11, 18:44:

fyi, even the windows registry is a file.

It's a database, stored in several files, but we are not supposed to edit those files directly, only through the API.

Right right, even if it's stored as files it's still not accessible to the user through the filesystem in the same way as is implied on Linux.