Scoop-extras: [Request] Add virtualbox app

Created on 8 Oct 2017  路  13Comments  路  Source: lukesampson/scoop-extras

I was wondering how difficult would it be to add a virtualbox manifest. If it is an easy task that a beginner can do then I am read to help with this if needed.

enhancement help-wanted request

Most helpful comment

Check this out.
virtualbox.json

All 13 comments

It may be _possible_ but I'm not sure you'd want to. VirtualBox needs several drivers to work correctly, add unless they're already installed I imagine elevated privileges or UAC prompts would be required. The installation wouldn't be self contained in this scenario.

There is a few portable solutions out there, but they're not without bugs and have the same driver limitations.

I see. I prefer to install it manually then.

This was already attempted: https://github.com/lukesampson/scoop/issues/229

You might create your own bucket for it. We could add it to the extras bucket because there are already a couple of other programs which need elevated privileges. If I recall correctly.

Here is a way I tried it:

{
    "homepage": "https://www.virtualbox.org/",
    "version": "5.1.28",
    "url": "http://download.virtualbox.org/virtualbox/5.1.28/VirtualBox-5.1.28-117968-Win.exe#/VirtualBoxSetup.7z",
    "hash": "5415db62fae9332cc06bc6c445d5f1338c7d0efa0842175658b272dff1e49c03",
    "pre_install": "
        move-item \"$dir\\BIN_00\" \"$dir\\VirtualBox_x86.msi\"
        move-item \"$dir\\BIN_01\" \"$dir\\VirtualBox_amd64.msi\"
        move-item \"$dir\\BIN_02\" \"$dir\\common.cab\"
        remove-item \"$dir\\HDR_*\"
        remove-item \"$dir\\MANIFEST\"
    ",
    "extract_dir": ".rsrc\\RCDATA",
    "architecture": {
        "64bit": {
            "installer": {
                "file": "VirtualBox_amd64.msi"
            }
        },
        "32bit": {

        }
    },
    "checkver": {
        "url": "https://update.virtualbox.org/query.php?platform=WINDOWS_64BITS_GENERIC&version=0.0.0",
        "re": "VirtualBox-(?<version>[\\d.]+)-(?<revision>[\\d]+)-Win.exe"
    },
    "autoupdate": {
        "url": "http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version-$matchRevision-Win.exe#/VirtualBoxSetup.7z",
        "hash": {
            "url": "https://www.virtualbox.org/download/hashes/$version/SHA256SUMS"
        }
    }
}

This manifest looks good. But I have two questions:

  1. Why does "https://update.virtualbox.org/query.php?platform=WINDOWS_64BITS_GENERIC&version=0.0.0" show 5.1.30 when the current version is 5.2.0
  2. How can we make scoop uninstall virtualbox actually call the uninstaller of virtualbox
  1. Version 5.2.0 was released two days ago, maybe there is a delay so not everyone updates directly (more time for emergency bugfixes?)
  2. Didn't try the uninstaller yet. This was a quick hack 馃槃

I updated the installer so that it only asks for privilege escalation.

"installer": {
    "file": "VirtualBox_amd64.msi",
    "args": ["/qb", "ADDLOCAL=VBoxApplication,VBoxUSB,VBoxNetwork,VBoxNetworkFlt,VBoxNetworkAdp,VBoxPython", "VBOX_INSTALLDESKTOPSHORTCUT=1", "VBOX_INSTALLQUICKLAUNCHSHORTCUT=0", "VBOX_START=0", "VBOX_REGISTERFILEEXTENSIONS=1"],
    "keep": "true"
}

I could uninstall using msiexec /x VirtualBox_amd64.msi /qb but I am not sure how can I go about adding this command to the manifest because it starts with msiexec.

Does one of these work?

"uninstaller": {
    "file": "msiexec",
    "args": ["/x", "VirtualBox_amd64.msi", "/qb"]
}
"uninstaller": {
    "script": "& msiexec /x \"$dir\\VirtualBox_amd64.msi\" /qb"
}

The first one tries to call $dir\\msiexec and so it fails.

The second one deletes the virtualbox app folder including VirtualBox_amd64.msi then tries to run msiexec /x VirtualBox_amd64.msi /qb but that file no longer exists.

Check this out.
virtualbox.json

@pakonda submit a PR?

@rasa I submitted a PR on nonportable bucket. https://github.com/oltolm/scoop-nonportable/pull/3
Which bucket should I submit?

Running wmic product where "name like 'Oracle VM VirtualBox%'" call uninstall from an elevated powershell/cmd requires even fewer steps 馃榿

Should we promote to add scoop-nonportable as a workaround?

scoop bucket add nonportable

Will it ever happen in here since the software installation requires UAC?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TangentFoxy picture TangentFoxy  路  5Comments

lx4r picture lx4r  路  8Comments

ggobbe picture ggobbe  路  3Comments

zhoujin7 picture zhoujin7  路  4Comments

Spiraster picture Spiraster  路  6Comments