Skip to content

yourtablecloth/ussfc

Repository files navigation

USSF-CSharp (ussfc)

NuGet NuGet Downloads Release

Universal Silent Setup Finder / Console — a C# port of alexandruavadanii/USSF, reimagined as a cross-platform, headless command-line tool.

Given an installer (or any binary stream), ussfc identifies the packaging format and prints the silent-install command line to use.

  • Version: 1.4.1.3 (the port started at the upstream AutoIt project's 1.4.1.2)
  • Runtime: .NET 10 file-based CLI (ussf.cs) over a small, unit-tested detection library (src/Ussf.Core)
  • License: Apache-2.0

Installation

Pick the option that fits your workflow.

Option 1 — Run with dnx (no install, .NET 10 SDK)

The fastest way to try ussfc. dnx is a one-shot tool runner shipped with the .NET 10 SDK; the first invocation downloads the package to your NuGet cache, subsequent runs are instant.

dnx ussfc setup.exe

If dnx isn't on your PATH, the equivalent works in any .NET 10 environment:

dotnet tool exec ussfc -- setup.exe

Option 2 — Install as a .NET global tool (.NET 10 SDK)

For repeated use, install once and call ussfc directly from any directory:

dotnet tool install -g ussfc
ussfc setup.exe

Update with dotnet tool update -g ussfc, remove with dotnet tool uninstall -g ussfc.

Option 3 — Download a prebuilt self-contained binary (no .NET required)

Grab the archive for your platform from the Releases page:

Platform Archive
Windows x64 ussfc-win-x64.zip
Windows ARM64 ussfc-win-arm64.zip
Linux x64 ussfc-linux-x64.tar.gz
Linux ARM64 ussfc-linux-arm64.tar.gz
macOS ARM64 (M1+) ussfc-osx-arm64.tar.gz

Each archive contains a single NativeAOT-compiled ussfc (or ussfc.exe) binary — no .NET runtime install required.

Option 4 — Run directly from source (.NET 10 SDK)

dotnet run ussf.cs -- setup.exe

Or, with the shebang on Unix:

chmod +x ussf.cs
./ussf.cs setup.exe

Usage

ussfc [options] <file_path>
<data> | ussfc [options]

Options

Option Description
--json Emit the result as JSON instead of human-readable text.
--help, -h Show usage information.
--version, -v Print the version and exit.

Examples

Analyze a file:

ussfc setup.exe
File: setup.exe
Extension: .exe
Type: NSIS Package
Usage: "setup.exe" /S

Emit JSON:

ussfc --json setup.msi
{
  "file": "setup.msi",
  "extension": ".msi",
  "type": "MSI File",
  "usage": "msiexec.exe /i \"setup.msi\" /qb",
  "notes": ""
}

Pipe a binary from stdin:

cat setup.exe | ussfc --json

Supported file types

Extension Type
.inf Information / Installation file
.reg Registry file
.msi Windows Installer package
.exe NSIS, Inno Setup, InstallShield, Wise, 7-Zip, WinZip, UPX, and more

Detection combines binary-signature matching (MZ, OLE Compound Document, etc.) with extension and text-content fallbacks.


Building from source

Project layout

ussf.cs                        # file-based CLI entry point (arg parsing, I/O, output)
src/Ussf.Core/                 # InstallerDetector — the pure, testable detection logic
tests/Ussf.Core.Tests/         # xUnit test suite for the detection logic

ussf.cs references the core library with a #:project directive, so dotnet run, dotnet publish, and dotnet pack all keep working on the single file while the detection logic lives in a normal library that unit tests can reference.

Quick run

dotnet run ussf.cs -- <args>

Run the tests

dotnet test tests/Ussf.Core.Tests

Publish a single-file binary

dotnet publish ussf.cs \
  -c Release \
  -r <rid> \
  --self-contained true \
  -p:PublishSingleFile=true \
  -o publish

Where <rid> is one of: win-x64, win-arm64, linux-x64, linux-arm64, osx-arm64.

Pack as a .NET tool

dotnet pack ussf.cs -c Release -o nupkg

The resulting ussfc.<version>.nupkg is a framework-dependent, platform-agnostic .NET tool package (tools/net10.0/any/) that targets net10.0.

Continuous delivery

Pushing a tag matching v* (e.g. v1.4.1.3) triggers two workflows:

  • .github/workflows/build.yml packs ussf.cs as a .NET tool NuGet package and publishes it to nuget.org using Trusted Publishing (OIDC — no API key). The publish job runs in the production environment and needs a NUGET_USER secret (the nuget.org profile name).
  • .github/workflows/release.yml builds NativeAOT single-file binaries for five RIDs and publishes a GitHub Release with all binary archives, SHA-256 checksums, and the .nupkg.

Both gate on the test suite, and both are also runnable on demand via the Run workflow button (workflow_dispatch).


Credits

  • Original AutoIt implementation: Alexandru Avadanii (Apache-2.0).
  • C# port and CLI design: Jung-Hyun Nam.

The port began at version 1.4.1.2, mirrored from the upstream project's Version.au3 to make the lineage explicit. Releases from 1.4.1.3 onward carry the C# port's own changes.

About

Universal Setup Switch Finder / Console (USSFC)

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages