Hot answers tagged

4 votes

What's the purpose of 'run as administrator' when using cmd or powershell?

Why should I run as administrator every time when I use cmd or powershell? You really should not. Why does one need Admin rights at all? To change certain system settings and to access/edit certain ...
  • 56.2k
2 votes
Accepted

Formatting a USB as EXT4 FileSystem format

You might be able to use WSL2 to access and format a disk as ext4 https://learn.microsoft.com/en-gb/windows/wsl/wsl2-mount-disk But this places a prerequisite on your program to have WSL2 enabled and ...
  • 85.6k
2 votes

How to run apps from Windows' command line like in Linux

In Linux is just so easy: you install an app and it's just automatically callable from the shell! That only applies to apps that install to standard locations like /usr/bin or /usr/local/bin. If you ...
  • 24.3k
2 votes
Accepted

Capture batch output and save it in TXT File as log

UPDATED RESPONSE The batch file becomes: PowerShell.exe -ExecutionPolicy Bypass -File %~dp0Check.ps1 pause And, using Tee-Output which takes the output of the previous command in the pipeline and ...
1 vote
Accepted

Generating a script through CMD

This whole concept seems a little wonkie. Why not just use the script and run that? .. ok .. whatever .. you do you. :) The script below creates your file in the temp directory in a folder using a ...
1 vote

How to run apps from Windows' command line like in Linux

using setx from CMD will probably cause mayhem in the long run This is absolute rubbish - there is nothing wrong with setx. Why windows doesn't automatically add newly installed programs to PATH? ...
  • 423k
1 vote
Accepted

Is there a way to extract subtitles from an MKV while maintaining the original format?

We may use FFprobe for getting the subtitles codec name, and apply the extracted subtitles file extension accordingly. The sample batch file is based on the following answer. Assume MKV file name is ...
  • 928
1 vote

Formatting a USB as EXT4 FileSystem format

There's no native way to do this (format EXT4 from Windows), AFAIK.
1 vote

Trying to safely eject a removable USB stick using a cmd one-liner

Based on this answer, the following formulation might work better: powershell.exe -Command $obj = (New-Object -comObject Shell.Application).namespace(17).ParseName('F:\');$Type = $obj.Type;while ($...
  • 423k
1 vote

Windows cannot find 'move'. Make sure you typed the name correctly and then try again

Windows never had move as a standalone program – it only exists as a built-in command in Cmd, and separately as an alias to Move-Item within PowerShell. You would need to run it as cmd /c move… for ...
  • 393k
1 vote
Accepted

How can I see the ICC of the sim that I have inserted in my computer in the command line?

From what I can find netsh mbn show read interface=* should provide more information, including the SIM ICC Id.
  • 85.6k
1 vote

What's the purpose of 'run as administrator' when using cmd or powershell?

Yes, put simply, it does just give the program more permission. You should not always run cmd or PowerShell this way. A program should only have as many privileges as they need to complete a ...

Only top scored, non community-wiki answers of a minimum length are eligible