short | long command | help | remark |
---|---|---|---|
0 | Address where the compressed file (zip) to download is located. is required and must be | required |
|
-f | --filename | Name with which the downloaded file will be saved, no need extension | def : update |
-e | --extension | Only use in special cases like 'msi', by default it autodetects, supported Archive Formats: Zip, GZip, Tar, Rar, 7Zip | |
-p | --filepath | Path where to download and unpack | def : base directory |
-w | --wait | Prevent the app from auto closing | |
-o | --open | Executable to start when the process terminate | |
-r | --remove | Remove files or directories before opening | separator ',' |
-i | --ignore | Ignore files when unzipping | separator ',' |
-d | --decopass | Password required to unzip the file | |
--help | Display this help screen | ||
--version | Display version information |
stateDiagram-v2
direction LR
updater --> download
download --> unpack
unpack --> open
note right of updater
run the updater from a command line
with the arguments
end note
note left of download
It will show the download {0} process
and the time taken
end note
note right of unpack
unpack {filename}.{extension} and overwrite the downloaded
file in the directory
end note
note left of open
run the executable {open}
the terminal
end note
💻 in your favorite terminal
.\updater 'url' -r update.zip -o 'exe' -w
🟢 example zip
.\updater https://github.com/NickeManarin/ScreenToGif/releases/download/2.37.1/ScreenToGif.2.37.1.Portable.x64.zip -o ScreenToGif.exe -w -r update, logs
🔮 call example in c#
var exe = "MyExe.exe";
var url = "https://..."
ProcessStartInfo psInfo = new()
{
FileName = "updater.exe",
UseShellExecute = true,
Arguments = $"{url} -o {exe} -r update -w"
};
Process.Start(psInfo);
Application.Exit();
🟢 example msi
https://www.exemsi.com/downloads/packages/Firefox/Firefox%20Setup%2014.0.1.msi -w -r update,logs -e msi
dotnet publish -p:PublishProfile=FolderProfile
Name | Descripción | Version |
---|---|---|
Serilog | Simple .NET logging with fully-structured events | 2.12.0 |
SharpCompress | .NET library compression types and formats. | 0.32.0 |
ShellProgressBar | visualize (concurrent) progress in your console application | 5.2.0 |
CommandLineParser | command line parser that brings standardized | 2.9.1 |