Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] scoop failing to install virtualbox-with-extension-pack-np #302

Open
Skips75 opened this issue Apr 21, 2024 · 4 comments
Open

[Bug] scoop failing to install virtualbox-with-extension-pack-np #302

Skips75 opened this issue Apr 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Skips75
Copy link

Skips75 commented Apr 21, 2024

Bug Report

Current Behavior

virtualbox-with-extension-pack-np version 7.0.16 installation failed

Expected Behavior

That virtualbox-with-extension-pack-np version 7.016 was installed.

Additional context/output

virtualbox-with-extension-pack-np

Possible Solution

System details

Windows version:
Windows 10 Pro x86_64
Version: 22H2
OS build: 19045.4291

OS architecture:
64bit

PowerShell version:
5.1.19041.4291

Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

powershell > cat ~/.config/scoop/config.json
{
"last_update": "2024-04-21T16:04:41.5469334+02:00",
"aria2-warning-enabled": false,
"scoop_branch": "master",
"scoop_repo": "https://github.com/lukesampson/scoop"
}

@Skips75 Skips75 added the bug Something isn't working label Apr 21, 2024
@niheaven niheaven transferred this issue from ScoopInstaller/Scoop Apr 22, 2024
@kkimurak
Copy link

This issue may be caused by changes made upstream. From 7.0.16 onwards, it is not possible to install anywhere other than a specific directory. The first install script (which runs the installer) fails, and the entire install fails because it cannot continue to create the shim.

See virtualbox issue tracker 22044 "Can't install Virtualbox 7.0.16 outside of C:\Program Files" : https://www.virtualbox.org/ticket/22044

@marryton007
Copy link

related issue, It can't install v7.0.16 and can't uninstall v7.0.14, but it seems that v7.0.14 has uninstalled. Please see the log

~ ❯ sudo scoop update *
virtualbox-np: 7.0.14 -> 7.0.16
winscp: 6.3.2 -> 6.3.3
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Updating 2 outdated apps:
Updating 'virtualbox-np' (7.0.14 -> 7.0.16)
Downloading new version
Loading VirtualBox-7.0.16-162802-Win.exe from cache.
Checking hash of VirtualBox-7.0.16-162802-Win.exe ... ok.
Uninstalling 'virtualbox-np' (7.0.14)
Running uninstaller script...
Removing shim 'VBoxBalloonCtrl.shim'.
Removing shim 'VBoxBalloonCtrl.exe'.
Removing shim 'VBoxBugReport.shim'.
Removing shim 'VBoxBugReport.exe'.
Removing shim 'VBoxDTrace.shim'.
Removing shim 'VBoxDTrace.exe'.
Removing shim 'VBoxExtPackHelperApp.shim'.
Removing shim 'VBoxExtPackHelperApp.exe'.
Removing shim 'VBoxHeadless.shim'.
Removing shim 'VBoxHeadless.exe'.
Removing shim 'vbox-img.shim'.
Removing shim 'vbox-img.exe'.
Removing shim 'VBoxManage.shim'.
Removing shim 'VBoxManage.exe'.
Removing shim 'VBoxNetDHCP.shim'.
Removing shim 'VBoxNetDHCP.exe'.
Removing shim 'VBoxNetNAT.shim'.
Removing shim 'VBoxNetNAT.exe'.
Removing shim 'VBoxSDS.shim'.
Removing shim 'VBoxSDS.exe'.
Removing shim 'VBoxSVC.shim'.
Removing shim 'VBoxSVC.exe'.
Removing shim 'VBoxTestOGL.shim'.
Removing shim 'VBoxTestOGL.exe'.
Removing shim 'VBoxWebSrv.shim'.
Removing shim 'VBoxWebSrv.exe'.
Removing shim 'VirtualBox.shim'.
Removing shim 'VirtualBox.exe'.
Removing shim 'VirtualBoxVM.shim'.
Removing shim 'VirtualBoxVM.exe'.
Unlinking D:\scoop\apps\virtualbox-np\current
Installing 'virtualbox-np' (7.0.16) [64bit] from 'nonportable' bucket
Loading VirtualBox-7.0.16-162802-Win.exe from cache.
Running installer script...
Remove-Item:
Line |
   7 |  Remove-Item "$env:PUBLIC\Desktop\Oracle VM VirtualBox.lnk"
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'C:\Users\Public\Desktop\Oracle VM VirtualBox.lnk' because it does not exist.
Remove-Item:
Line |
   8 |  Remove-Item -Recurse "$([Environment]::GetFolderPath('commonstartmenu …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Oracle VM VirtualBox' because it does not exist.
Linking D:\scoop\apps\virtualbox-np\current => D:\scoop\apps\virtualbox-np\7.0.16
Creating shim for 'VBoxBalloonCtrl'.
Get-Command: D:\scoop\apps\scoop\current\lib\install.ps1:783
Line |
 783 |              $bin = (Get-Command $target).Source
     |                      ~~~~~~~~~~~~~~~~~~~
     | The term 'VBoxBalloonCtrl.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or
     | if a path was included, verify that the path is correct and try again.
Can't shim 'VBoxBalloonCtrl.exe': File doesn't exist.
~ ❯
~ ❯
~ ❯ sudo scoop update *
virtualbox-np: 7.0.14 -> 7.0.16
winscp: 6.3.2 -> 6.3.3
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Updating 2 outdated apps:
Updating 'virtualbox-np' (7.0.14 -> 7.0.16)
Downloading new version
Loading VirtualBox-7.0.16-162802-Win.exe from cache.
Checking hash of VirtualBox-7.0.16-162802-Win.exe ... ok.
Uninstalling 'virtualbox-np' (7.0.14)
Running uninstaller script...
No Instance(s) Available.
ERROR Could not find product ID

~ ❯ scoop status
Scoop is up to date.

Name          Installed Version Latest Version Missing Dependencies Info
----          ----------------- -------------- -------------------- ----
virtualbox-np 7.0.14            7.0.16

~ ❯ sudo scoop update virtualbox-np
~ ❯ sudo scoop update virtualbox-np
virtualbox-np: 7.0.14 -> 7.0.16
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Updating one outdated app:
Updating 'virtualbox-np' (7.0.14 -> 7.0.16)
Downloading new version
Loading VirtualBox-7.0.16-162802-Win.exe from cache.
Checking hash of VirtualBox-7.0.16-162802-Win.exe ... ok.
Uninstalling 'virtualbox-np' (7.0.14)
Running uninstaller script...
No Instance(s) Available.
ERROR Could not find product ID
~ ❯

@Junf137
Copy link

Junf137 commented Apr 27, 2024

Same issue occurred when trying to install latest virtualbox-with-extension-pack-np ((7.0.16)) on Windows 11.

C:\Users\Eric> scoop install nonportable/virtualbox-with-extension-pack-np
WARN  Purging previous failed installation of virtualbox-with-extension-pack-np.
ERROR 'virtualbox-with-extension-pack-np' isn't installed correctly.
Removing older version (7.0.16).
'virtualbox-with-extension-pack-np' was uninstalled.
Installing 'virtualbox-with-extension-pack-np' (7.0.16) [64bit] from 'nonportable' bucket
Loading VirtualBox-7.0.16-162802-Win.exe from cache.
Loading Oracle_VM_VirtualBox_Extension_Pack-7.0.16.vbox-extpack from cache.
Checking hash of VirtualBox-7.0.16-162802-Win.exe ... ok.
Checking hash of Oracle_VM_VirtualBox_Extension_Pack-7.0.16.vbox-extpack ... ok.
Running installer script...
Remove-Item:
Line |
   7 |  Remove-Item "$env:PUBLIC\Desktop\Oracle VM VirtualBox.lnk"
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'C:\Users\Public\Desktop\Oracle VM VirtualBox.lnk' because it does not exist.
Remove-Item:
Line |
   8 |  Remove-Item -Recurse "$([Environment]::GetFolderPath('commonstartmenu …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Oracle VM VirtualBox' because it does not exist.
Linking D:\Scoop\apps\virtualbox-with-extension-pack-np\current => D:\Scoop\apps\virtualbox-with-extension-pack-np\7.0.16
Creating shim for 'VBoxBalloonCtrl'.
Get-Command: D:\Scoop\apps\scoop\current\lib\install.ps1:783
Line |
 783 |              $bin = (Get-Command $target).Source
     |                      ~~~~~~~~~~~~~~~~~~~
     | The term 'VBoxBalloonCtrl.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify
     | that the path is correct and try again.
Can't shim 'VBoxBalloonCtrl.exe': File doesn't exist.

And seems like the VirtualBox developers have no intention to change the installation location policy to allow user to install this software in other places.

@kkimurak
Copy link

kkimurak commented May 8, 2024

Section "Windows Installation Directory Security Requirements" is added to official documentation. This change is committed on 2024-04-25 (v7.0.16 release is on 2024-04-16).
One of my concern is that the restriction also applied to all parent directries. As scoop will be installed to ~/scoop by default, and can be changed by user. It may be easy to add permission update process to installation script but I'm not sure the permission can be modified as requested.

HTML documentation: https://www.virtualbox.org/manual/ch02.html#install-win-installdir-req
HTML documentation source: https://www.virtualbox.org/browser/vbox/trunk/doc/manual/en_US/dita/topics/install-win-installdir-req.dita?rev=104427

2.1.2. Windows Installation Directory Security Requirements

The installation directory on Windows hosts must meet certain security requirements, in order to be accepted by the Windows installer.

This also applies for upgrades of Oracle VM VirtualBox.

For example, when installing Oracle VM VirtualBox into a custom location at X:\Data\MyPrograms\Oracle VM VirtualBox, all parent directories of this path (namely X:\Data and X:\Data\MyPrograms) have to meet the following Discretionary Access Control List (DACL):

     Users               S-1-5-32-545:(OI)(CI)(RX)
     Users               S-1-5-32-545:(DE,WD,AD,WEA,WA)
     Authenticated Users S-1-5-11:(OI)(CI)(RX)
     Authenticated Users S-1-5-11:(DE,WD,AD,WEA,WA)

Directory inheritance must also be disabled for all parent directories.

You can use the icacls Windows command line tool to meet the security requirements. For example:

     icacls <Directory> /reset /t /c
     icacls <Directory> /inheritance:d /t /c
     icacls <Directory> /grant *S-1-5-32-545:(OI)(CI)(RX)
     icacls <Directory> /deny  *S-1-5-32-545:(DE,WD,AD,WEA,WA)
     icacls <Directory> /grant *S-1-5-11:(OI)(CI)(RX)
     icacls <Directory> /deny  *S-1-5-11:(DE,WD,AD,WEA,WA)

Note that these commands must be repeated for all parent directories (X:\Data and X:\Data\MyPrograms in this example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants