Problems Getting Battery Stats from Command line - windows

I am having Problems Getting Battery Stats from Command line. So the command that I have been running in PowerShell(yes as Admin) is powercfg -energy and the error generated is
The Power Efficiency Diagnostic library (energy.dll) could not be loaded
So then I was told that I should make sure the file was correct version with sfc /scannow and generates the error
Windows Resource Protection could not start the repair service
So then I check Windows Modules Installer service with service.msc and it is set to Manual
Any Insight is appreciated, Thanks

The problem was that i was running it in powershell. It works fine if I run it in command prompt. Thanks for the help

Related

What does this error about a missing system 32 file mean?

Windows Script Host
Error: Cannot find script file
"C:\Windows\system32\Maintenance.vbs"
When I'm on my laptop, this error occurs every time I plug in the charger. What does it mean and how can I fix it?
I would run SFC /scannow in command prompt as an administrator.
This will verify that all key windows files are installed and working properly. .vbs scripts tent too be malicious however so if this doesn't find any problems with windows I would run and antivirus scan

How to bypass the Elevated prompt error during silent installation

I am trying to download and silently install Anaconda on user's computer by using a batch file. The command that is used in my batch files is according to the original documentation of Anaconda. However, every time I run this batch of code, it gives me an error that says:
Installation for all users requires an elevated prompt.
This however only happens when I set the installation type to AllUsers. If I set the installation type to JustMe, it will be able to download and install Anaconda.
curl "https://repo.continuum.io/archive/Anaconda2-4.3.0.1-Windows-x86.exe" -o "prerequisites\\Anaconda2-4.3.0.1-Windows-x86.exe"
%cd%\prerequisites\Anaconda2-4.3.0.1-Windows-x86.exe /InstallationType=AllUsers /RegisterPython=1 /S /D=C:\Anaconda
Unfortunately, I need to find a way to set the installation type to AllUsers. I had also tried running the batch file using administrator mode but to no avail. Can anyone tell me what I am missing out? I've been on this for days and still could not find the correct solution to this.

Composer setup - "The system cannot find the file specified"

I'm trying to install composer, but it showing an error message. I'm using Windows 8.1, and download composer Windows Installer from https://getcomposer.org/download/.
The command interpreter did not run correctly:
C:\Windows\system32\cmd.exe
The system cannot find the file specified
The cmd file is existing on C:\Windows\System32\cmd.exe. And it run normally
I strongly suggest posting questions regarding the windows installer # https://github.com/composer/windows-setup/issues
The maintainer of our windows installer binary can answer most questions and is very friendly and helpful :-)
1- Open cmd.exe ( administrator mode ).
2- Write this command sfc /scannow (My be take long time for scanning).
2- Re-install composer.

Have tried all traditional troubleshooting: "Can't find script engine "VBScript" for script..."

I've done all the traditional fixes in every major threads related to this problem and I still get this error. I'm trying to run a .vbs to install a webdisk onto my computer. (Please note that I'm not a programmer so I'm hoping to receive help in Layman's terms.)
I've gone into registry and fixed the HKEY to list the .dll.
I've deleted all cleaners and adblockers and anti-virus programs.
I've created a new .reg that merged threads.
Please help. I'm going crazy up here at the lake.
Cheers.
Please follow the following steps:
Open command prompt as Administrator using Run As Administrator
Now type sfc /scannow and press enter.
Check the message that you get and take the corresponding action as mentioned here.
You can also try doing the following:
Run regsvr32 vbscript.dll and regsvr32 jscript.dll in command prompt as administrator.
Also run the Windows Cleanup Utility as Administrator.
This should fix your issue.

installation using msi.exec open help options every time

I have been trying to install a msi file using cmd. The command looks like
C:\Windows\system32>msiexec.exe -q -i "Installer.msi"
But every time I run this the window for help options is opened for msi instead of running the installer. What could be the problem?
First, you need to specify the full path to the MSI file. Also, the command line is really picky if you are specifying anything else, and sometimes it doesn't like spaces between value=proprtyname. Those errors will give you the help screen because you got the syntax wrong in some way.
Note that the MSI file will not install successfully in silent mode if it requires elevation. It won't ask for the elevation prompt if you are in silent mode. That means you should try the command line install from an elevated prompt.
I think msiexec.exe /i installer.msi /qn should work.
See here for a similar thread on serverfault: https://serverfault.com/questions/30068/silent-install-of-msi/67001#67001
To deal with the complicated msiexec.exe command line interface, try this free tool from Installation tool developer Altiris: http://www2.wise.com/filelib/WICLB.exe - broken link resurrected from Wayback machine. Seeing as the tool was freeware I assume that is legal.
Please run the download by virustotal.com for safety.
Here is a screenshot:

Resources