Create normal and admin taskbar shortcuts for the same program (e.g. cmd.exe) in Windows 10

Published 2019-09-21, 20:27

On my new Windows machine I try to use the package manager Chocolatey to install all programs. As it requires an administrative cmd.exe or PowerShell, I had the problem of wanting two shortcuts in my taskbar – one for installing programs, and another one for then using the command line normally.

This unfortunately is not as easy as it sounds, as if you just try to create a second shortcut by searching for the program, then using right click to „pin to taskbar“ it will recognize a shortcut already exists and only allows you to remove it – no matter if you changed it to run as administrator or not.

Fortunately you can work around that: Create a new shortcut manually (for example on your desktop), point it to cmd.exe /k and name it „Command Prompt (Admin)“ and then pin that to the taskbar additionally to the existing one. The param is standard anyway (as far as I know – no negative side effects observed until now), but it will make the shortcut different enough for Windows letting you do that.

How to stop Windows 10 from going to sleep after locking it with Win+L

Published 2019-05-10, 13:14

Recently my Windows 10 machine started to go into sleep mode shortly after I locked it with the Windows + L keys. This was new behavior, and after realizing what was happening I googled a bit to find a solution:

https://superuser.com/a/1186786/25933

(As usual, this post is a not to myself so I can easier find this in the future.)

Notes on iTMSTransporter (autoupdate)

Published 2019-03-07, 16:29

Proxy iTMSTransporter traffic on Windows

Published 2019-03-07, 16:26

  1. Install iTMSTransporter on Windows
  2. Install your proxy application, e.g. Charles Proxy
  3. Use Java’s keytool to add the Charles Root Certificate to your Java installation
    • to add: keytool -import -alias charles -keystore ..\lib\security\cacerts -file c:\root.cer (password: changeit)
    • to check: keytool -list-keystore ..\lib\security\cacerts (same password)
  4. Execute the iTMSTransporter command with the proxy parameters: iTMSTransporter.cmd -m diagnostic -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8888 (via)
    • Depending on the command you might have to change the transport via -t DAV
  5. Make sure SSL proxying is enabled for the relevant Apple domains (probably contentdelivery.itunes.apple.com and itmsdav.apple.com)
  6. Profit?

How to reload environment variables (including PATH) in Windows Command line / cmd.exe

Published 2019-01-23, 18:30

Do you know all those installation instructions that tell you to restart your Windows console after installing a tool that adds itself to your PATH so its binary can directly be called?

Well, today I learned there is a much easier way to achieve this:

refreshenv
>refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait...Finished..

Thanks to meteor for telling me about this in its Chocolatey/choco output:

Environment Vars (like PATH) have changed. Close/reopen your shell to see the changes (or in powershell/cmd.exe just type `refreshenv`).

How to change the color scheme of Windows Command Prompt / cmd.exe

Published 2019-01-23, 16:37

Last week we announced the exciting news that Windows Console has a new default color scheme, and also promised you that we would release a tool to make it easier to change the console to your desired scheme. The Windows Console team is proud to present the ‚Colortool‚ which you can use to apply the new default color scheme, and several alternate pre-defined color schemes or even schemes of your own!

https://blogs.msdn.microsoft.com/commandline/2017/08/11/introducing-the-windows-console-colortool/

Download from https://github.com/Microsoft/console/releases, unzip to folder that is in your PATH environment variable, use via colortool solarized_dark for example.

TIL: How to Fix a Slow-Opening Windows Downloads Folder

Published 2019-01-22, 15:10

Opening my Downloads folder from Firefox or Chrome always was slow. Reaaaaaally slow. So finally I googled „opening downloads folder from firefox is slow“ and found this short article, the explains a simple and perfectly fine solution:

https://www.laptopmag.com/articles/slow-windows-downloads-folder

Yay!

Android Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value

Published 2018-11-16, 17:38

Debugging and fixing a broken Android SDK setup is always „fun“ – especially on a CI environment where you don’t control the actual installation.

It gets worse when all the StackOverflow answers and other Google results for the error you are getting are basically „I executed some slightly related, but otherwise random commands, and after that it worked“.

In my specific case I was getting this error message when trying to start an Android Emulator:

PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value

It was really hard to find out what „AVD system path“ actually meant and how my ANRDOID_SDK_ROOT could be connected to that.

So to maybe make this search a bit easier for future people having this problem, I write a solution down here:

Continue reading Android Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value…

How to create an empty file in cmd.exe / Windows Command Line

Published 2018-11-14, 16:45

copy NUL EMptyFile.txt
copy /b NUL EmptyFile.txt

 https://stackoverflow.com/a/1702790/252627

Azure Devops Pipelines: Software available on Microsoft hosted agents

Published 2018-11-14, 15:27

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=vsts&tabs=yaml#software contains links to READMEs on GitHub that list the available software

16 queries. 0,123 seconds.