[HOME] [DOWNLOAD] [DOCS] [NEWS] [SUPPORT] [TIPS] [ISSUES] [DONATE]

Windows Installer

Just a hint: The native way in Windows would be to use a X.509 code signing certificates instead of GPG. After signing an exe, Windows will no longer show the “unknown publisher” warning but your name, which gives Windows users a warm feeling.

Cheapest certificate possible (17.22€ / year) is this:

https://en.sklep.certum.pl/data-safety/code-signing-certificates/open-source-code-signing.html

‘Limitation’ is, that “OPEN SOURCE DEVELOPER” is being added to your name.

Good day,

If you’ve got an idea you may want to persue, I’d recommend you not to wait for me. I won’t have time finishing what I “produced” today, nor tomorrow (maths test), so I’ll be able to finish it on saturday, earliest.

Have a nice day,

Ego

No need to waste time, if we both work on competing approches. My concept is finished. If we should opt for yours, there is no point in doing detail work on the InnoSetup script now.

Thomas:

Just a hint: The native way in Windows would be to use a X.509 code
signing certificates instead of GPG. After signing an exe, Windows
will no longer show the “unknown publisher” warning but your name,
which gives Windows users a warm feeling.

Very much worthwhile. Additional gpg signatures however would be good
since those do not depend on certificate authorities.

Another very “low priority” goal for now are deterministic builds. [It’s
very worthwhile to have, but it will take a long time until
deterministic images will be available and until then its usefulness is
smaller. Just something to keep in mind - not adding purposely variable
stuff (when building the same version twice) such as timestamps.]

Good day,

so, after having spent the last few hours on it, here a status update:

First of all, the base is finished. I’ve got a concept (which is very similar to the one I’ve propose in post #51) and was able to overcome all problems, but two. To accomplish all this, I was forced to leave my “SFX-comfort-zone” and move to a (to the user invisible) comand line based approach, using the 7za.exe, offerd by 7-Zip (the project, I mean) as well.

Currently, the installer works in the following way: After showing the usual “disclaimer” and “introduction” pages, the user may (or may not) select, a path for the extraction of both the virtual HDD for the Gateway, as well as for the Workstation (more on that latter). After that, I start cmd.exe in the background. What this does is run the following command: “/K 7za e Whonix_Images.7z Destination”. This runs the 7za.exe found in the /bin folder of my project, which in turn starts to execute the Whonix_Images.7z, which is in the same folder. The destination is set (or should be set) through a “openfiledialog” which is shown to the user prior. While this all happens, all the user see is a nice progress bar, filling with some tastefull green.

Now, at this point I have to take two paths, so bear with me for a moment: What I want to happen in the final version is that, after the GW and WS are extracted, the installation of VBox starts automatically and the user sees no transition whatsoever between the two seperate methods of installation. This is something which seemingly can be done, though I still need to find a way of running the entirety of the VBox installer in cmd for this to work.

For the time beeing though, I was forced to call the installer at this point and go through it by hand. In the final version, I also would like to use the installation destination from before for both VBox and the VHDDs, just with different “Sub-folders”.

After VBox is installed (either way) I simply run vboxmanage (again, with cmd) to create the necessary Debian-VMs and link the VHDDs. While this happens, I (again) show a progress bar. Like I’ve said, in the final “version”, there should really only be one progress bar, as everything else appears unprofessional. While this progress bar fills, I also extract an alternative GUI for VBox, more to that though, when the design is ready in the thread regarding it (the GUI, I mean).

Now, as you may or may not have noticed from how I talked about it, I currently have a problem with setting the destination manually (i.e. by the user). You see, I use this command to run cmd.exe with the needed command:

string strCmdText; strCmdText = "/K 7za e Whonix_Images.7z Insert_Destination"; System.Diagnostics.Process.Start("CMD.exe", strCmdText);

The issue is, that I am unable to find out, how I can mix normal “text” (or string, if you like), with C# code (or any code for that matter). If someone knows something in that direction, I would really apreciate it. Doesn’t even have to be for C#, anything to get me on the right track would be great. The same issue (of course), also plaques the “vboxmanage part”, which is why I manually set fixed locations, to test both of them.

Have a nice day,

Ego

Can you explain a bit more what you mean? The three lines of code seem to show that you know how to handle strings in C#…

You really do this with .NET 1.0?

Good day,

Ok, let me just explain with a snippet of my code (have included the necessary explanations with //):

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;

namespace Whonix_Installer
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void Next_Click(object sender, EventArgs e)
        {
            string strCmdText;
            //Here, I tell the programm to open a command line and run the comment in the quotes. However, this doesn't include the destination from the file dialog below.
            strCmdText = "/K 7za e Whonix_Images.7z";
            System.Diagnostics.Process.Start("CMD.exe", strCmdText);
            this.Hide();
            var form4 = new Form4();
            form4.Show();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
               
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.Description = "Please select a path for the installation";
            fbd.RootFolder = Environment.SpecialFolder.Desktop;
            if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                textBox1.Text = fbd.SelectedPath;
        }

        private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
        {
               //Here, the user may choose a destination. This needs to somehow be included in the string where the problem lies.
        }
    }
}

The problem is, that I am unable to mix a string and the code from the folder dialog. Think I have found a solution though.

Have a nice day,

Ego

Escaping CMD.EXE can be a tricky thing. Consider the /S switch.

Why not calling 7za directly?

System.Diagnostics.Process.Start("7za.exe", "e Whonix_Images.7z");

Good day,

mainly because I don’t know a way of hiding the window which 7za.exe opens, but I know a way of hiding the commandline. That happens like this:

System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/K 7za e Whonix_Images.7z";
process.StartInfo = startInfo;
process.Start();

This was just not included in the code above, because currently, I want to have some viewable feedback when debuging. I’ll see, wether I can hide 7za.exe using a similar method, don’t see why this shouldn’t work actually.

Have a nice day,

P.S.: Sorry, forgoth answering this before:

Ego[quote=“thomiel, post:80, topic:1909”]
You really do this with .NET 1.0?
[/quote]

Yes, as at the moment I’ve only used commands which are compatible with the very first version of C#.

Ok then, try with escaped " this way:

startInfo.Arguments = "/K \"7za e C:\\My\\Unzip\\Folder\\Whonix_Images.7z\"";

The /K option wants the command as a single parameter, so you need to use quotation marks.

Good day,

ok, thanks for the input, I’ll try that.

Have a nice day,

Ego

Good day,

after having (irregularily) worked on this for quite some time now, it seems that I’ve been able to get as far as possible at the moment. Have created a coherent installer, which doesn’t necessitate additional downloading or any other actions by the user outside of itself for importing, etc. I still need to finish testing, though at the moment, there seem to be no bigger issues, had a rather big bug to deal with, which put developement almost completley to a halt. However, there is one problem I still couldn’t solve, which I want to get rid of:

The installer for VirtualBox. You see, under Windows, VBox isn’t designed to be installed via a commandline but only per GUI. That’s why, at the moment, I have to call the VBox-Installer externally and let the user go through that process there. While it is integrated in my installer, it is still input on the site of the user, I want to remove. That however, means that I’ll have to somehow recode parts of the VBox Installer to automate it. It’ll certainly take some additional time, though I think it is worth it.

Anyway, will upload the current version in the next days, once I’m fairly certain that everything works under any Windows.

Have a nice day,

Ego

1 Like

This is volunteer or paid postion?

(because i dont think anybody would be interested in working on vbox installer for Windows (at least volunteerly).)

Volunteer. Unlikely indeed but not impossible.

1 Like

Updated project for unified ova and dropped x86 support.

Untested. Has a good chance of working though.

Build documentation updated as well. Untested.


More recent discussion:

[Imprint] [Privacy Policy] [Cookie Policy] [Terms of Use] [E-Sign Consent] [DMCA] [Investors] [Priority Support] [Professional Support]