Upstream changes from WiseUnpacker

This commit is contained in:
Matt Nadareski
2025-08-10 21:44:23 -04:00
parent cf5135f330
commit 4ef79ccdca
9 changed files with 196 additions and 22 deletions

View File

@@ -0,0 +1,32 @@
namespace SabreTools.Models.WiseInstaller.Actions
{
/// <summary>
/// Add to AUTOEXEC.BAT
///
/// This action edits Autoexec.bat, which is executed during startup, allowing you to add
/// commands that are executed before Windows loads.
///
/// Insert commands at a particular line number, or search the file for specific text and
/// insert the new line before, after, or in place of the existing line. The destination
/// computer is restarted after installation to force the new commands to take effect.
/// </summary>
/// <remarks>
/// 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")
/// </remarks>
/// <see href="https://www.manualslib.com/manual/404969/Symantec-Wisescript-Editor-8-0-Reference-For-Wise-Package-Studio-V1-0.html"/>
public class AddToAutoexecBat : FunctionData
{
/// <summary>
/// Arguments passed in from the Call DLL Function
/// </summary>
public string[]? Args { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
namespace SabreTools.Models.WiseInstaller.Actions
{
/// <summary>
/// Add to CONFIG.SYS
///
/// This action edits the Config.sys file to add new commands. Insert commands at a
/// particular line number, or search the file for specific text and insert the new line before,
/// after, or in place of the existing line. The destination computer is restarted automatically
/// to force the new commands to take effect.
/// </summary>
/// <remarks>
/// 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")
/// </remarks>
/// <see href="https://www.manualslib.com/manual/404969/Symantec-Wisescript-Editor-8-0-Reference-For-Wise-Package-Studio-V1-0.html"/>
public class AddToConfigSys : FunctionData
{
/// <summary>
/// Arguments passed in from the Call DLL Function
/// </summary>
public string[]? Args { get; set; }
}
}

View File

@@ -22,6 +22,12 @@ namespace SabreTools.Models.WiseInstaller.Actions
/// Expected Values:
/// - Start block if function returns true (0x02 or 0x03)
/// - Loop while function returns true (0x02 or 0x03)
/// - Hide progress bar before calling function (0x04)
/// - Unknown (0x08) - Unset if external library call?
/// - Unknown (0x10) - Results in the flag being (^ 0x30)
/// - Unknown (0x20) - Checked for existence along with 0x08
/// not existing to run a function. It also results
/// in the flag value being (^ 0x30)
/// </remarks>
public byte Flags { get; set; }
@@ -50,11 +56,6 @@ namespace SabreTools.Models.WiseInstaller.Actions
/// <summary>
/// One entry per language count
/// </summary>
/// <remarks>
/// TODO: Figure out if it's more appropriate to store
/// the string data in its unparsed form or as the concrete
/// class data, where possible.
/// </remarks>
public string[]? Entries { get; set; }
public FunctionData[]? Entries { get; set; }
}
}

View File

@@ -0,0 +1,45 @@
namespace SabreTools.Models.WiseInstaller.Actions
{
/// <summary>
/// Check HTTP Connection
///
/// This action determines whether a given URL is valid by using WinSock.dll to try to
/// download the HTML page.
///
/// If the installation is not true 32-bit, specify both Win16 and Win32 error variables. Then,
/// the Win32 WinSock.dll is used, followed by the Win16 WinSock.dll. Otherwise, only the
/// 32-bit version is used.
/// </summary>
/// <remarks>
/// This action is called through Call DLL Function and is mapped to "f38".
/// </remarks>
/// <see href="https://www.manualslib.com/manual/404969/Symantec-Wisescript-Editor-8-0-Reference-For-Wise-Package-Studio-V1-0.html"/>
public class CheckHttpConnection : FunctionData
{
/// <summary>
/// URL to check
/// </summary>
/// <remarks>Includes http://</remarks>
public string? UrlToCheck { get; set; }
/// <summary>
/// 32-bit windosck.dll error text return
/// </summary>
public string? Win32ErrorTextVariable { get; set; }
/// <summary>
/// 32-bit winsock.dll error code return
/// </summary>
public string? Win32ErrorNumberVariable { get; set; }
/// <summary>
/// 16-bit windosck.dll error text return
/// </summary>
public string? Win16ErrorTextVariable { get; set; }
/// <summary>
/// 16-bit winsock.dll error code return
/// </summary>
public string? Win16ErrorNumberVariable { get; set; }
}
}

View File

@@ -25,9 +25,9 @@ namespace SabreTools.Models.WiseInstaller.Actions
public byte[]? Padding { get; set; } // 0x02 - 0x2A
/// <summary>
/// Source file
/// Destination path
/// </summary>
public string? Source { get; set; } // 0x2B - ?
public string? Destination { get; set; } // 0x2B - ?
/// <summary>
/// Description, one per language + 1
@@ -35,8 +35,8 @@ namespace SabreTools.Models.WiseInstaller.Actions
public string[]? Description { get; set; }
/// <summary>
/// Destination file
/// Source file
/// </summary>
public string? Destination { get; set; }
public string? Source { get; set; }
}
}

View File

@@ -31,18 +31,16 @@ namespace SabreTools.Models.WiseInstaller.Actions
/// Data type, defaults to 0 if not defined
/// in source scripts
/// </summary>
/// <remarks>
/// This value is a byte in most versions of the WiseScript
/// format, but seems to be a ushort in newer(?) versions.
/// It is unknown if this is version-controlled or
/// flag-controlled, but it is difficult to tell what uses
/// which format.
///
/// One version of WISE0001.DLL has the length as 2 bytes,
/// notably from an installer that is not that old. In the
/// final check, it only seems to check the first byte.
/// </remarks>
public ushort DataType { get; set; }
public byte DataType { get; set; }
/// <summary>
/// An unknown value that appears in some versions.
/// Its presence indicates to load an external DLL
/// for performing registry actions. Investigation
/// is needed on how to determine the script is the
/// version that uses this string or not.
/// </summary>
public string? UnknownFsllib { get; set; }
/// <summary>
/// Key path

View File

@@ -0,0 +1,20 @@
namespace SabreTools.Models.WiseInstaller.Actions
{
/// <summary>
/// External DLL Call
///
/// This represents a call to an external DLL.
/// </summary>
/// <remarks>
/// This action is called through Call DLL Function and is invoked when
/// the external DLL path is provided.
/// </remarks>
/// <see href="https://www.manualslib.com/manual/404969/Symantec-Wisescript-Editor-8-0-Reference-For-Wise-Package-Studio-V1-0.html"/>
public class ExternalDllCall : FunctionData
{
/// <summary>
/// Arguments passed in from the Call DLL Function
/// </summary>
public string[]? Args { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
namespace SabreTools.Models.WiseInstaller.Actions
{
/// <summary>
/// Unknown
/// </summary>
/// <remarks>
/// 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
/// </remarks>
/// <see href="https://www.manualslib.com/manual/404969/Symantec-Wisescript-Editor-8-0-Reference-For-Wise-Package-Studio-V1-0.html"/>
public class UnknownF0 : FunctionData
{
/// <summary>
/// Arguments passed in from the Call DLL Function
/// </summary>
public string[]? Args { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
namespace SabreTools.Models.WiseInstaller.Actions
{
/// <summary>
/// Unknown
/// </summary>
/// <remarks>
/// 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")
/// </remarks>
/// <see href="https://www.manualslib.com/manual/404969/Symantec-Wisescript-Editor-8-0-Reference-For-Wise-Package-Studio-V1-0.html"/>
public class UnknownF30 : FunctionData
{
/// <summary>
/// Arguments passed in from the Call DLL Function
/// </summary>
public string[]? Args { get; set; }
}
}