diff --git a/SabreTools.Models/WiseInstaller/Actions/AddDirectoryToPath.cs b/SabreTools.Models/WiseInstaller/Actions/AddDirectoryToPath.cs
new file mode 100644
index 0000000..51bf8e1
--- /dev/null
+++ b/SabreTools.Models/WiseInstaller/Actions/AddDirectoryToPath.cs
@@ -0,0 +1,36 @@
+namespace SabreTools.Models.WiseInstaller.Actions
+{
+ ///
+ /// Add Directory to PATH
+ ///
+ /// This action adds a directory to the PATH environment variable, as set in Autoexec.bat.
+ /// The directory is appended to every occurrence of the SET PATH statement that does not
+ /// already contain it. A SET PATH statement is added if none exists. The system restarts at
+ /// the end of installation so that the new PATH takes effect.
+ ///
+ ///
+ /// This action is called through Call DLL Function and is mapped to "f0".
+ ///
+ ///
+ public class AddDirectoryToPath : FunctionData
+ {
+ ///
+ /// Flags from the argument data
+ ///
+ ///
+ /// Encoded as a string, binary representation in script file.
+ /// Expected flags:
+ /// - Location to add [start of PATH or end of PATH] (unknown)
+ /// + No indication that this flag is respected, if it exists
+ /// - Add to all PATH variables (unknown)
+ /// + Only seems to apply to AUTOEXEC.BAT-based paths?
+ ///
+ public byte DataFlags { get; set; }
+
+ ///
+ /// Directory name to add to path
+ ///
+ /// May contain a variable name
+ public string? Directory { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Actions/AddToAutoexecBat.cs b/SabreTools.Models/WiseInstaller/Actions/AddToAutoexecBat.cs
index c882361..2dcb91f 100644
--- a/SabreTools.Models/WiseInstaller/Actions/AddToAutoexecBat.cs
+++ b/SabreTools.Models/WiseInstaller/Actions/AddToAutoexecBat.cs
@@ -12,21 +12,51 @@ namespace SabreTools.Models.WiseInstaller.Actions
///
///
/// This action is called through Call DLL Function and is mapped to "f1".
- ///
- /// Probably this layout:
- /// - Flags (numeric) (e.g. "12", "8")
- /// - Unknown string (empty in samples)
- /// - Executable path (e.g. "%WIN%\hcwSubID.exe", "765.exe")
- /// - Executable path again (e.g. "%WIN%\hcwSubID.exe", "765.exe")
- /// - Unknown string (empty in samples)
- /// - Numeric value (e.g. "0")
///
///
public class AddToAutoexecBat : FunctionData
{
///
- /// Arguments passed in from the Call DLL Function
+ /// Flags from the argument data
///
- public string[]? Args { get; set; }
+ ///
+ /// Encoded as a string, binary representation in script file.
+ /// Expected flags:
+ /// - Case Sensitive (0x01)
+ /// - Insert Action (unknown)
+ /// - Match Criteria (unknown)
+ /// - Ignore White Space (unknown)
+ /// - Make Backup File (unknown)
+ ///
+ public byte DataFlags { get; set; }
+
+ ///
+ /// Full path to the text file to edit
+ ///
+ ///
+ /// Ignored because structure is shared with both
+ /// and
+ ///
+ public string? FileToEdit { get; set; }
+
+ ///
+ /// Text to insert into the file
+ ///
+ public string? TextToInsert { get; set; }
+
+ ///
+ /// Search for Text
+ ///
+ public string? SearchForText { get; set; }
+
+ ///
+ /// Comment Text
+ ///
+ public string? CommentText { get; set; }
+
+ ///
+ /// Line number to insert text at, 0 for append to end
+ ///
+ public int LineNumber { get; set; }
}
}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Actions/AddToConfigSys.cs b/SabreTools.Models/WiseInstaller/Actions/AddToConfigSys.cs
index cfa624d..97feda5 100644
--- a/SabreTools.Models/WiseInstaller/Actions/AddToConfigSys.cs
+++ b/SabreTools.Models/WiseInstaller/Actions/AddToConfigSys.cs
@@ -10,21 +10,51 @@ namespace SabreTools.Models.WiseInstaller.Actions
///
///
/// This action is called through Call DLL Function and is mapped to "f2".
- ///
- /// Probably this layout:
- /// - Flags (numeric) (e.g. "12", "8")
- /// - Unknown string (empty in samples)
- /// - Executable path (e.g. "%WIN%\hcwSubID.exe", "765.exe")
- /// - Executable path again (e.g. "%WIN%\hcwSubID.exe", "765.exe")
- /// - Unknown string (empty in samples)
- /// - Numeric value (e.g. "0")
///
///
public class AddToConfigSys : FunctionData
{
///
- /// Arguments passed in from the Call DLL Function
+ /// Flags from the argument data
///
- public string[]? Args { get; set; }
+ ///
+ /// Encoded as a string, binary representation in script file.
+ /// Expected flags:
+ /// - Case Sensitive (0x01)
+ /// - Insert Action (unknown)
+ /// - Match Criteria (unknown)
+ /// - Ignore White Space (unknown)
+ /// - Make Backup File (unknown)
+ ///
+ public byte DataFlags { get; set; }
+
+ ///
+ /// Full path to the text file to edit
+ ///
+ ///
+ /// Ignored because structure is shared with both
+ /// and
+ ///
+ public string? FileToEdit { get; set; }
+
+ ///
+ /// Text to insert into the file
+ ///
+ public string? TextToInsert { get; set; }
+
+ ///
+ /// Search for Text
+ ///
+ public string? SearchForText { get; set; }
+
+ ///
+ /// Comment Text
+ ///
+ public string? CommentText { get; set; }
+
+ ///
+ /// Line number to insert text at, 0 for append to end
+ ///
+ public int LineNumber { get; set; }
}
}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Actions/Unknown0x06.cs b/SabreTools.Models/WiseInstaller/Actions/DisplayBillboard.cs
similarity index 62%
rename from SabreTools.Models/WiseInstaller/Actions/Unknown0x06.cs
rename to SabreTools.Models/WiseInstaller/Actions/DisplayBillboard.cs
index 9b64f93..33e14f2 100644
--- a/SabreTools.Models/WiseInstaller/Actions/Unknown0x06.cs
+++ b/SabreTools.Models/WiseInstaller/Actions/DisplayBillboard.cs
@@ -3,29 +3,25 @@ namespace SabreTools.Models.WiseInstaller.Actions
///
/// Display Billboard
///
+ /// This action displays a bitmap or .GRF file during installation if you have set the
+ /// background to display a gradient on the Screen page. Create .GRF files (scalable
+ /// bitmaps) with the Custom Billboard Editor.
///
+ /// You can use up to 16 Display Billboard actions in the script.
///
- ///
- /// This is likely compressed Billboard data, though it is
- /// very difficult to determine what the format of the extracted
- /// data is. The official documentation mentions that it's
- /// a vector format, but it does not appear to be natively
- /// openable with standard graphics viewing programs.
- ///
///
///
- public class Unknown0x06 : MachineStateData
+ public class DisplayBillboard : MachineStateData
{
///
- /// Flags(?)
+ /// Flags
///
///
- /// Values from WISE0001.DLL
- /// - & 0x4000 != 0 -> FUN_1000bb6a
- /// - & 0x3805 != 0 ->
- ///
+ /// Expected values:
+ /// - 0x3805 - Erase num?; Erase all?
+ /// - 0x4000 - Hide progress bar
///
- public ushort Operand_1 { get; set; } // 0x01 - 0x02
+ public ushort Flags { get; set; } // 0x01 - 0x02
///
/// Flags(?)
@@ -34,7 +30,7 @@ namespace SabreTools.Models.WiseInstaller.Actions
/// Values from WISE0001.DLL
/// - >> 0x0F -> piVar3[10]
/// - & 0x4000 -> uVar8 = Operand_2 & 0x3FFF
- /// - [0x04] & 0x80 != 0 ->
+ /// - Unknown (0x8000)
///
public ushort Operand_2 { get; set; } // 0x03 - 0x04
@@ -50,7 +46,8 @@ namespace SabreTools.Models.WiseInstaller.Actions
///
/// Deflate information
///
- public ScriptDeflateInfoContainer? DeflateInfo { get; set; } // 0x07 -
+ /// One per language
+ public ScriptDeflateInfo[]? DeflateInfo { get; set; } // 0x07 -
///
/// Terminator?
diff --git a/SabreTools.Models/WiseInstaller/Actions/EditRegistry.cs b/SabreTools.Models/WiseInstaller/Actions/EditRegistry.cs
index bf1330c..c5e46c1 100644
--- a/SabreTools.Models/WiseInstaller/Actions/EditRegistry.cs
+++ b/SabreTools.Models/WiseInstaller/Actions/EditRegistry.cs
@@ -22,6 +22,9 @@ namespace SabreTools.Models.WiseInstaller.Actions
///
/// To get the root value, do (FlagsAndRoot & 0x1F)
/// Flag values:
+ /// - 0x10 - Force backup of registry value (if 0x80 == 0)
+ /// + It overrides the values set by 0x24 and 0x25
+ /// and then disables the flag after
/// - 0x40 - Delete? (If root is not 0?)
/// - 0x80 - Unknown
///
diff --git a/SabreTools.Models/WiseInstaller/Actions/InstallDirectXComponents.cs b/SabreTools.Models/WiseInstaller/Actions/InstallDirectXComponents.cs
new file mode 100644
index 0000000..a72d0e5
--- /dev/null
+++ b/SabreTools.Models/WiseInstaller/Actions/InstallDirectXComponents.cs
@@ -0,0 +1,43 @@
+namespace SabreTools.Models.WiseInstaller.Actions
+{
+ ///
+ /// Install DirectX Components
+ ///
+ /// Little is known about this function other than it seems to install any
+ /// local DirectX components, if necessary. No official documentation
+ /// is publicly available that contains a reference to this.
+ ///
+ ///
+ /// This action is called through Call DLL Function and is mapped to "f30".
+ ///
+ ///
+ public class InstallDirectXComponents : FunctionData
+ {
+ ///
+ /// Flags from the argument data
+ ///
+ ///
+ /// Encoded as a string, binary representation in script file.
+ /// Expected flags:
+ /// - 0x40 - Unsets itself and sets 0x200 if not already
+ /// - If final value & 0x3fffff7f == 0, return failure
+ ///
+ public byte DataFlags { get; set; }
+
+ ///
+ /// Root path containing all DirectX components
+ ///
+ public string? RootPath { get; set; }
+
+ ///
+ /// Path to the DSETUP.DLL to be used
+ ///
+ public string? LibraryPath { get; set; }
+
+ ///
+ /// Unknown numeric value
+ ///
+ /// Not fully identified; replaces the flags if not 0?
+ public int SizeOrOffsetOrFlag { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Actions/InstallFile.cs b/SabreTools.Models/WiseInstaller/Actions/InstallFile.cs
index 434a696..481b586 100644
--- a/SabreTools.Models/WiseInstaller/Actions/InstallFile.cs
+++ b/SabreTools.Models/WiseInstaller/Actions/InstallFile.cs
@@ -92,8 +92,11 @@ namespace SabreTools.Models.WiseInstaller.Actions
public string[]? Description { get; set; }
///
- /// Seen used on hl15of16.exe and hl1316.exe, on others its \0
+ /// Source file
///
- public string? Operand_11 { get; set; }
+ ///
+ /// Unused because structure is internally shared with
+ ///
+ public string? Source { get; set; }
}
}
diff --git a/SabreTools.Models/WiseInstaller/Actions/Unknown0x24.cs b/SabreTools.Models/WiseInstaller/Actions/Unknown0x24.cs
new file mode 100644
index 0000000..4b072a4
--- /dev/null
+++ b/SabreTools.Models/WiseInstaller/Actions/Unknown0x24.cs
@@ -0,0 +1,17 @@
+namespace SabreTools.Models.WiseInstaller.Actions
+{
+ ///
+ /// Unknown
+ ///
+ ///
+ /// This action enables a flag that is used by this and .
+ /// It seems to only be referenced in contexts where there are registry
+ /// keys read and written, specifically about repair.
+ ///
+ ///
+ ///
+ public class Unknown0x24 : MachineStateData
+ {
+ // There is no data
+ }
+}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Actions/Unknown0x25.cs b/SabreTools.Models/WiseInstaller/Actions/Unknown0x25.cs
new file mode 100644
index 0000000..53de78f
--- /dev/null
+++ b/SabreTools.Models/WiseInstaller/Actions/Unknown0x25.cs
@@ -0,0 +1,17 @@
+namespace SabreTools.Models.WiseInstaller.Actions
+{
+ ///
+ /// Unknown
+ ///
+ ///
+ /// This action enables a flag that is used by this and .
+ /// It seems to only be referenced in contexts where there are registry
+ /// keys read and written, specifically about repair.
+ ///
+ ///
+ ///
+ public class Unknown0x25 : MachineStateData
+ {
+ // There is no data
+ }
+}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Actions/UnknownF0.cs b/SabreTools.Models/WiseInstaller/Actions/UnknownF0.cs
deleted file mode 100644
index 46bb649..0000000
--- a/SabreTools.Models/WiseInstaller/Actions/UnknownF0.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-namespace SabreTools.Models.WiseInstaller.Actions
-{
- ///
- /// Unknown
- ///
- ///
- /// This action is called through Call DLL Function and is mapped to "f0".
- ///
- /// Could be either:
- /// - Set Control Text
- /// - Set Current Control
- ///
- /// Layout is unknown
- ///
- ///
- public class UnknownF0 : FunctionData
- {
- ///
- /// Arguments passed in from the Call DLL Function
- ///
- public string[]? Args { get; set; }
- }
-}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Actions/UnknownF30.cs b/SabreTools.Models/WiseInstaller/Actions/UnknownF30.cs
deleted file mode 100644
index 8b41459..0000000
--- a/SabreTools.Models/WiseInstaller/Actions/UnknownF30.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-namespace SabreTools.Models.WiseInstaller.Actions
-{
- ///
- /// Unknown
- ///
- ///
- /// This action is called through Call DLL Function and is mapped to "f30".
- ///
- /// Maybe "Modify Component Size"?
- ///
- /// Probably this layout:
- /// - Flags (numeric)
- /// - Directory name (e.g. "%INST%\..\DirectX")
- /// - File name (e.g. "%INST%\..\DirectX\DSETUP.DLL")
- /// - Offset? (e.g. "2623")
- ///
- ///
- public class UnknownF30 : FunctionData
- {
- ///
- /// Arguments passed in from the Call DLL Function
- ///
- public string[]? Args { get; set; }
- }
-}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Constants.cs b/SabreTools.Models/WiseInstaller/Constants.cs
index 9a856fd..1724c3d 100644
--- a/SabreTools.Models/WiseInstaller/Constants.cs
+++ b/SabreTools.Models/WiseInstaller/Constants.cs
@@ -12,30 +12,42 @@ namespace SabreTools.Models.WiseInstaller
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
];
///
/// Count of non-language strings for an Action
///
- /// Derived from WISE0001.DLL
+ ///
+ /// Derived from WISE0001.DLL
+ /// One variant of the DLL has action 0x06 have a
+ /// value of `0x01` instead of `0x00`.
+ /// One variant of the DLL has action 0x18 have a
+ /// value of `0x01` instead of `0x00`.
+ ///
public static readonly byte[] CountOfStaticActionStrings =
[
0x02, 0x00, 0x01, 0x00, 0x00, 0x03, 0x00, 0x03,
0x00, 0x04, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00,
0x00, 0x01, 0x03, 0x00, 0x02, 0x02, 0x01, 0x01,
0x00, 0x03, 0x02, 0x00, 0x01, 0x02, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
];
///
/// Size of the invariant data for an Action
///
- /// Derived from WISE0001.DLL
+ ///
+ /// One variant of the DLL has action 0x18 have a
+ /// value of `0x06` instead of `0x01`.
+ ///
public static readonly byte[] SizeOfStaticActionData =
[
0x2B, 0x00, 0x02, 0x02, 0x02, 0x01, 0x13, 0x02,
0x02, 0x02, 0x03, 0x02, 0x02, 0x01, 0x00, 0x01,
0x01, 0x01, 0x2B, 0x00, 0x0D, 0x02, 0x01, 0x06,
0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00,
];
}
}
\ No newline at end of file
diff --git a/SabreTools.Models/WiseInstaller/Enums.cs b/SabreTools.Models/WiseInstaller/Enums.cs
index 2015abd..fc6b9de 100644
--- a/SabreTools.Models/WiseInstaller/Enums.cs
+++ b/SabreTools.Models/WiseInstaller/Enums.cs
@@ -76,9 +76,9 @@ namespace SabreTools.Models.WiseInstaller
EditIniFile = 0x05,
///
- /// Deflated file just used by the installer? (No filename)
+ /// Display billboard
///
- UnknownDeflatedFile0x06 = 0x06,
+ DisplayBillboard = 0x06,
///
/// Execute Program
@@ -216,30 +216,50 @@ namespace SabreTools.Models.WiseInstaller
OpenCloseInstallLog = 0x1E,
///
- /// Unknown
+ /// Invalid case
///
- Unknown0x1F = 0x1F,
+ Invalid0x1F = 0x1F,
///
- /// Unknown
+ /// Invalid case
///
- Unknown0x20 = 0x20,
+ Invalid0x20 = 0x20,
///
- /// Unknown
+ /// Invalid case
///
- Unknown0x21 = 0x21,
+ Invalid0x21 = 0x21,
///
- /// Unknown
+ /// Invalid case
///
- Unknown0x22 = 0x22,
+ Invalid0x22 = 0x22,
///
/// ElseIf Statement
///
ElseIfStatement = 0x23,
+ ///
+ /// Enable repair?
+ ///
+ ///
+ /// The flag used by this and seems
+ /// to only be referenced in contexts where there are registry
+ /// keys read and written, specifically about repair.
+ ///
+ Unknown0x24 = 0x24,
+
+ ///
+ /// Disable repair?
+ ///
+ ///
+ /// The flag used by this and seems
+ /// to only be referenced in contexts where there are registry
+ /// keys read and written, specifically about repair.
+ ///
+ Unknown0x25 = 0x25,
+
// Check in WISE0001.DLL suggests that there could be up
// to opcode 0x3F. If the opcode is greater than 0x3F,
// then the installation aborts with 0xfffffffe.
diff --git a/SabreTools.Models/WiseInstaller/ScriptDeflateInfo.cs b/SabreTools.Models/WiseInstaller/ScriptDeflateInfo.cs
index 46dd29e..691c622 100644
--- a/SabreTools.Models/WiseInstaller/ScriptDeflateInfo.cs
+++ b/SabreTools.Models/WiseInstaller/ScriptDeflateInfo.cs
@@ -9,16 +9,16 @@ namespace SabreTools.Models.WiseInstaller
///
/// Start of the deflated data
///
- public uint DeflateStart { get; set; }
+ public uint DeflateStart { get; set; } // 0x00 - 0x03 (0x07 - 0x0A)
///
/// End of the deflated data
///
- public uint DeflateEnd { get; set; }
+ public uint DeflateEnd { get; set; } // 0x04 - 0x07 (0x0B - 0x0E)
///
/// Inflated data size
///
- public uint InflatedSize { get; set; }
+ public uint InflatedSize { get; set; } // 0x08 - 0x0B (0x0F - 0x12)
}
}
diff --git a/SabreTools.Models/WiseInstaller/ScriptDeflateInfoContainer.cs b/SabreTools.Models/WiseInstaller/ScriptDeflateInfoContainer.cs
deleted file mode 100644
index 95fc28f..0000000
--- a/SabreTools.Models/WiseInstaller/ScriptDeflateInfoContainer.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace SabreTools.Models.WiseInstaller
-{
- ///
- public class ScriptDeflateInfoContainer
- {
- ///
- /// One per language
- ///
- public ScriptDeflateInfo[]? Info { get; set; }
- }
-}
diff --git a/SabreTools.Models/WiseInstaller/ScriptHeader.cs b/SabreTools.Models/WiseInstaller/ScriptHeader.cs
index f390289..43c6113 100644
--- a/SabreTools.Models/WiseInstaller/ScriptHeader.cs
+++ b/SabreTools.Models/WiseInstaller/ScriptHeader.cs
@@ -9,13 +9,37 @@ namespace SabreTools.Models.WiseInstaller
///
/// Flags, unknown mapping
///
- public byte Flags { get; set; } // 0x00
+ ///
+ /// The high byte (0x01) being any value but 0x00 indicates
+ /// that a 32-bit library will be used.
+ ///
+ public ushort Flags { get; set; } // 0x00 - 0x01
///
/// Unknown
///
- /// 4 bytes
- public byte[]? UnknownBytes_1 { get; set; } // 0x01 - 0x04
+ ///
+ /// Read in a loop with , possibly
+ /// an offset? It's read into an array.
+ ///
+ /// Both values are then used to build variable names if they're
+ /// non-zero. The variable names use "SYS" as the template.
+ /// The values are then seemingly read over?
+ ///
+ public ushort UnknownU16_1 { get; set; } // 0x02 - 0x03
+
+ ///
+ /// Unknown
+ ///
+ ///
+ /// Read in a loop with , possibly
+ /// an offset? It's read into an array.
+ ///
+ /// Both values are then used to build variable names if they're
+ /// non-zero. The variable names use "SYS" as the template.
+ /// The values are then seemingly read over?
+ ///
+ public ushort UnknownU16_2 { get; set; } // 0x04 - 0x05
///
/// Total deflated size of OP 0x00 files?
@@ -69,7 +93,7 @@ namespace SabreTools.Models.WiseInstaller
/// 0x40 - ????
/// byte[1]
/// 0x00 - ????
- /// 0x10 - EditRegistry data type is 2 bytes
+ /// 0x10 - ????
public byte[]? Unknown_22 { get; set; } // 0x15 - 0x2B
///