Things you'll need
•	DOSBox version 0.74 or newer (https://sourceforge.net/projects/dosbox/files/latest/download)
•	DOSBox MEGABUILD6 (https://mega.nz/file/d0MmEIaT#tNwedz9GFikTxK7viUQwPbm026hezu5nRQb50l_5k7k)
•	A copy of the file EDIT.COM     (https://mega.nz/file/E1VWxIyJ#cY38rVy5EsNKoGrogWOX1rP9hdycJfuiPt9UJjkn5OM)
•	A copy of the Windows 95 installation diskette set (https://tilde.club/~cano/piracy.html)
•	The WinImage disk utility (http://www.winimage.com/download.htm)
•	7-Zip (https://www.7-zip.org/)
Preparation
If you have any questions about any of these steps, feel free to ask me for help!
First, you need to create an environment to work in within DOSBox. Create a new folder on your desktop and name it "Win95".
Next, you need to configure DOSBox to work within this folder. To do this, open your DOSBox configuration file, then scroll to the very bottom. You should see a section that reads:
[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
Underneath this block of text, add the following:
@echo off
mount A "C:\Users\your username\Desktop\Win95"
A:
Save the file. Then, copy the EDIT.COM file into your Win95 folder. Now, try launching DOSBox and then run the command "edit". You should see a blue text editor open in DOSBox. You can close DOSBox now.
The next thing you want to do is to configure DOSBox so that it can run Windows 95 properly. Open your DOSBox configuration file again, and find the section labelled "[cpu]". Underneath this, you want to find these two variables:
core=auto
cputype=auto
Change them so that they say this instead:
core=dynamic
cputype=pentium_slow
Optionally, you can change the graphics mode to VGA instead of SVGA. I like to do this, but SVGA mode is more modern. DOSBox runs in SVGA mode by default. To change it to VGA mode, find the section in your configuration file labelled "[dosbox]", and underneath that, the variable "machine=svga_s3". Change this so that it reads "machine=vgaonly" instead.
Save your changes and then close the configuration file. You won't need to open it again.
Next, you'll want to install all of the programs you downloaded if you haven't already. Presumably you already have DOSBox 0.74 or newer installed, so you'll want to install DOSBox MEGABUILD6 alongside it, as well as the 7-Zip archiver. You don't need to install WinImage, though you will need to unzip it somewhere, like your desktop.
Next, you'll need to use 7-Zip or WinRAR to extract the files in the Windows 95 installation diskette archive. This should give you 22 .img files; Bootdisk.img and 21 numbered Disk*.img files. Copy the Bootdisk.img file to your Win95 folder.
Then, open the 7-Zip File Manager and browse to the folder containing the numbered disk image files. Click on Disk 1, then hold the shift key and click on Disk 21; this will select all of them. Next, click the extract button. You should see a text box that says "*\" in it; change this to say "win95" instead, then click OK. This will create a folder named "win95" containing a number of .CAB files as well as many others. These are your Windows 95 setup files. Remember this folder because it will be important later.
You've done a lot of work so far and you haven't even used DOSBox for anything yet, so at this point feel free to take a break and get yourself a juice box. You're almost finished setting up.
The next step is to create your hard disk images. Think of these as virtual hard drives. To do this, open DOSBox MEGABUILD6 and run the following commands:
imgmake "C:\Users\your username\Desktop\Win95\win95.img" -t hd -size 500 -nofs
imgmake "C:\Users\your username\Desktop\Win95\setup.img" -t hd -size 500 -nofs
You can close DOSBox MEGABUILD6 now; you won't be needing it again.
Next, you need to partition your hard disk images. To do this, open DOSBox, then run the following commands:
imgmount 2 win95.img -size 512,63,16,1015 -t hdd -fs none
boot bootdisk.img
You will see the Windows 95 command prompt. From here, you want to run the fdisk command. Press the enter key to create a new DOS partition, then press enter again to set it as your primary partition. Lastly, press enter a third time to allow fdisk to use the entire disk image. You will see a message telling you to shut down your computer for the changes to take effect; this means to close DOSBox and re-open it.
Next, you need to do the same thing for your setup disk:
imgmount 2 setup.img -size 512,63,16,1015 -t hdd -fs none
boot bootdisk.img
Follow the same steps to partition your setup disk with fdisk.
Then, you need to format your hard disk images for use with Windows 95. Run the following commands in a new DOSBox window:
imgmount 2 win95.img -size 512,63,16,1015 -t hdd -fs none
imgmount 3 setup.img -size 512,63,16,1015 -t hdd -fs none
boot bootdisk.img
This will bring you back to the Windows 95 command prompt. From here, run the following commands:
format C:
format D:
Each time you run the format command, it will ask you to type the letter Y to confirm. Do this and then press enter. When it asks you for a label, type anything you want, or just press enter to leave it blank; either is fine. After formatting both disk images, close DOSBox.
Lastly, you need to copy the Windows 95 setup files into your setup disk image. Open your setup.img file using WinImage, then click and drag the folder containing all of your Windows 95 setup files, that you extracted from the numbered disk images, into your setup disk. Click the save icon to save your changes, and then you're done.
Installing Windows 95
Now you're ready to begin installing Windows 95!
First, open DOSBox again, and run the following commands:
imgmount 2 win95.img -size 512,63,16,1015 -t hdd -fs none
imgmount 3 setup.img -size 512,63,16,1015 -t hdd -fs none
boot bootdisk.img
You will be greeted with the familiar Windows 95 command prompt. Next, run these commands:
D:
cd win95
setup /is
Now you can click on the DOSBox window and enjoy setting up Windows 95! Keep in mind that this is all happening virtually, and your actual Windows installation is not being touched.
Also of note: When Setup asks you if you would like to create a startup disk, click no.
After Setup is complete, DOSBox will close.
Running Windows 95
To boot your new virtual Windows 95 installation, you're going to create a batch launcher for it. This way, you never have to type those long commands again in order to start Windows 95. To do this, open a new DOSBox window and run the edit command. Then, type the following lines of text into the editor:
@echo off
imgmount 2 win95.img -size 512,63,16,1015 -t hdd -fs none
boot -l C
Once you've typed this, press the alt key, and then the F key followed by the S key to save the file. Name the file "start.bat" and press enter. Now, press alt followed by F followed by X to close the editor.
Lastly, from the command prompt, run the start command to boot Windows 95. When you run Windows 95 for the first time, some additional setup steps will occur. Simply set your timezone, and when asked to choose a printer, click the cancel button.
Final notes
Now every time you want to run Windows 95, simply open DOSBox and run the start command. You can put other installers on your setup disk image as well, like the Windows 98 installer. I can write up a guide for that as well. You may also be interested in running Windows 3.1 in DOSBox, which is much easier. You can also run any version of MS-DOS, PC DOS, or DR-DOS in DOSBox; Windows 95 is only the beginning.