Installing scoop fails: "Running the installer as administrator is disabled by default, see https://github.com/ScoopInstaller/Install#for-admin" - failed-installation

Whenever i run the command line to install scoop on windows through Powershell, it just says "Running the installer as administrator is disabled by default, see https://github.com/ScoopInstaller/Install#for-admin for details."
I have tried to run Powershell as administrator and the "-RunAsAdmin" option but none seem to work for me.

You need run the command as administrator. Try the below command:
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"

Related

bq command not found

I am currently working on windows machine. Installed WSL to be able to work in Linux env.
Installed the Google Cloud SDK and am able to run gsutil and gcloud commands.
However, while trying to run bq, I get the bq command not found error.
Can someone help me here?
"bq" is one of the default Cloud SDK components, and gets installed by default.
Please check with the command "gcloud components list" to confirm if "bq" is available.
If not, maybe somehow your installation got corrupted. Please try re-installing to fix this issue.
Otherwise, try running these commands, see how the path for all are set and same like "/usr/bin" in the given example. This may reveal some path setting related issues which need to be fixed.
I've run into a similar issue when working on a Windows environment. I have found that calling bq.cmd helps to get the BigQuery commands to execute.
So running:
bq.cmd ls
instead of running:
bq ls
To list datasets in your current project.
In WSL2, install the Google Cloud CLI with this command as shown in the documentation.
curl https://sdk.cloud.google.com | bash
Then restart your WSL installation. The bq command works at both a Windows command prompt and a WSL terminal.

wsl --set-default-version 2 The service cannot be started, either because it is disabled or because it has no enabled devices associated with it

I'm trying to install again Ubuntu on my Windows 10 Home Version 20H2 OS Build 19042.685 using WSL2.
The problem is the WSL2 installation is not finished.
I received the following message doing Step 5 - Set WSL 2 as your default version
PS C:\WINDOWS\system32> wsl
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
Previous steps done:
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.572
Image Version: 10.0.19042.685
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.572
Image Version: 10.0.19042.685
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32>
Then I restarted Windows and
execute wsl_update_x64.msi
I had the same issue:
C:\WINDOWS\system32> wsl --set-default-version 2
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
The problem was Kaspersky. The solution is simple: open cmd.exe as administrator and run the following code
sc config LxssManager start=auto
Kaspersky will give you a pop-up about a potential thread. Tell Kaspersky to ignore the alert. Please don't click on "Fix it" button for Kaspersky or you will undo the solution.
That should fix it.
Docans is right; running:
sc config LxssManager start=auto
in Command Prompt seems to fix the issue. However, you must run Command Prompt as an Administrator. I don't have enough reputation to comment or edit the post to clarify this so I have to make it a separate answer.
PS: Windows Command shell needs to be open with Admin privileges (Run as administrator)

How to isolate terminal on WebStorm 2019.3

In WebStorm 2018.3.5 when I press Up key it suggests me the last command I ran on this exact tab.
On WebStorm 2019.3.1 when I run a command on other tab or run something from system terminal and open a new tab and press Up it suggests me the last actual command ran on the system not in current tab.
Is there any way to configure it to have its own commands history in the latest WebStorm version?
OS I am currently running is Linux Mint 18 and using zsh as a shell.
Thanks.

Run Powershell or Command Prompt as administrator during Visual Studio Team Services build

I am working on a project where we are delay signing the assemblies. I need to use the strong name tool a couple times during the build, to turn off strong name verification, and then to fully sign the assemblies before they are packaged. I attempted to use a powershell step to turn off verification, but it came back with this error:
Script:
$testprojs = gci Project.*.dll -r
$testprojs | % {
sn -Vr $_
write-output $("Turned off sn verification for " + $_.Name)
}
Error:
Failed to open registry key -- Administrator permissions are needed to use
the selected options. Use an administrator command prompt to complete these tasks.
So I created a script that would run the first one, but added the -elevated parameter. This made no difference.
I also tried using a command prompt step instead of powershell. This also returned the same error.
For /r %g in ("Project.*.dll") DO sn -Vr %g
When I tried running this same script rdp'd to the build agent machine itself, it works as intended. It's only when it runs as a step in the build does it not work.
Any ideas?
According to your description:
When I tried running this same script rdp'd to the build agent machine
itself, it works as intended.
I assume you are using your own build agent for build. Then this may caused by the build agent isn't running with an administrator account. Please update your build agent to run with administrator account and then try again.
Run the agent Run as a service
If you deployed the agent to run as a Windows service, then the agent
running status can be controlled from the Services snap-in. Run
services.msc and look for "VSO Agent ()". If you
need to change the logon account, don't do it from the services
snap-in. Instead, From an elevated Command Prompt, run:
C:\Agent\Agent\VsoAgent.exe /ChangeWindowsServiceAccount Run
interactively
Otherwise if you installed the agent to run interactively, the agent
can be started by launching Agent\VsoAgent.exe.
Refer to this link for details: Run the agent

VirtualBox Headless - Linux

I have Virtualbox installed on a machine that I want to run headless.
If I ssh into that machine I'm able to run
VBoxHeadless --startvm "WindowsXP" &
and everything runs great.
I want to run the guest headless.
I put the above command into
/etc/rc.local
but it doesn't spark up, after I restart.
I've written a bash script that starts the guest too and tried putting a reference to the bash script into rc.local but it does't work.
What am I doing wrong? Doesn't rc.local run commands after all the init.d scripts have run?
Thanks in advance!
You have to run VBoxHeadless as the same user that you used to create the setup. Have you done that?
You can use the su command for this
su - <username> -c 'VBoxHeadless --startvm "WindowsXP"'
For windows users its the same idea.
C:\Program File\Oracle\VirtualBox\VBoxHeadless.exe --startvm "uuid|name" --vrde off
More info can be found in:
http://www.virtualbox.org/manual/ch07.html#vboxheadless