-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_script.ps1
102 lines (76 loc) · 2.25 KB
/
install_script.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<#Author JohnDripper#>
<#https://github.com/MrDiagnose/Windows98-install-scripts-DosBox-X#>
<#Version: 1.0.5#>
<#set default output encoding of >>/> to utf8#>
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
$_folder_ = "win98_scripts" <#change folder name here#>
<#Checks if win98_scripts folder exists or not#>
if (Test-Path $_folder_) {
Write-Host "`nFolder Already Exists"
}
else {
New-Item $_folder_ -ItemType Directory
Write-Host "`nFolder Created Successfully"
}
$win98_conf = {
[sdl]
autolock=true
[dosbox]
title=Windows 98
memsize=512
cycles=max
[video]
vmemsize=4
vesa modelist width limit=0
vesa modelist height limit=0
[dos]
ver=7.1
hard drive data rate limit=0
floppy drive data rate limit=0
[cpu]
cputype=pentium_mmx
core=normal
[sblaster]
sbtype=sb16vibra
[fdc, primary]
int13fakev86io=true
[ide, primary]
int13fakeio=true
int13fakev86io=true
[ide, secondary]
int13fakeio=true
int13fakev86io=true
cd-rom insertion delay=4000
[render]
aspect=true
aspect_ratio=0:0
scaler=none
[autoexec] }
$hdd_size = Read-Host -Prompt "`nEnter HDD in gigabytes eg 1 for 1gb ,2 for 2gb etc "
$hdd = "hd_" + $hdd_size + "gig"
$install_command = { IMGMOUNT C win98.img
IMGMOUNT D win98.iso
IMGMOUNT A -bootcd D
BOOT A: }
<#create *.conf file named win98_install.conf#>
Write-Output $win98_conf > "$_folder_\win98_install.conf"
Write-Output "IMGMAKE win98.img -t $hdd" >> "$_folder_\win98_install.conf"
Write-Output $install_command >> "$_folder_\win98_install.conf"
$run_command = { IMGMOUNT C win98.img
IMGMOUNT D Win98.iso
BOOT C:
[sdl]
fullscreen=true
fullresolution = desktop
output = opengl
autolock=true }
<#create *.conf file named win98_run.conf#>
Write-Output $win98_conf > "$_folder_\win98_run.conf"
Write-Output $run_command >> "$_folder_\win98_run.conf"
$run_script = { start .\dosbox-x.exe -conf }
<#create executable batch file#>
Write-Output "@echo off" > run_win98.bat
Write-Output "$run_script $_folder_\win98_run.conf" >> run_win98.bat
Write-Output "exit" >> run_win98.bat
<#run the install script using dosbox-x#>
.\dosbox-x.exe -conf "$_folder_\win98_install.conf"