For certain actions it is required that the Windows Explorer is stopped in order to avoid open file handles or other actions that can be done while the Explorer is running. Windows is configured to restart the Explorer automatically when its process is terminated. I wrote a small PowerShell script that checks the current setting,… Continue reading Prevent explorer from automatically restarting
Category: PowerShell
Automated Eclipse downloader
I work with Eclipse a lot and to download a new version, which comes out 4 times a year, I use the following script. It can be executed with PowerShell and does not require Java to be installed on the system because it downloads the OpenJDK version itself. Eclipse can then be found in the… Continue reading Automated Eclipse downloader
Automate with ssh
Scenario I have a bunch of Linux hosts to perform actions on. Updates, certificates, cleanup, you name it. I do all my work over “ssh” but for that to work the hosts must be trusted. Of course I can use “ssh-keyscan” to get the keys but my own “known_hosts” file gets pretty messed up when… Continue reading Automate with ssh
Escaping in shells
First things first: A string with spaces is enclosed in either single quotes ‘ or double quotes “. The difference you ask? Single quotes are treated “as is”: No variable replacement, no parsing, just a string. If you want to embed a variable value, you have to concatenate the string. Period. Double quotes allow dynamic… Continue reading Escaping in shells
Check if remote database exists
Escaping in PowerShell or in any other scripting language is not that much fun to begin with. So if you have quotes in quotes on different shells in different systems it becomes really funny. So trust me, I am more than surprised that I just found a neat way to check, if a database exists… Continue reading Check if remote database exists
Eclipse bundle creator
For development of Spring Boot applications, designing Jasper reports, writing regular Java applications and libraries build with Gradle, development of database scripts and DB management in general with DBeaver and development of C/C++ applications I use Eclipse with a few plugins. Now eclipse releases a new version every three month and I was always annoyed… Continue reading Eclipse bundle creator
Setup Msys2 automatically
Some time ago I wrote a short post on “How to develop a 64bit C application on Windows 10 with Visual Studio Code“. To be honest´it is a little bit tricky setting up the development environment, with gcc, gdb, make and other required tools. So I have extended my automated installation script. This script will:… Continue reading Setup Msys2 automatically
Get full path of executable in PATH variable
Ever wanted to get the full path of an executable that is located in the global PATH variable? Maybe for configuration purposes? Take a look at the following snippet. It may help you: This will show the full path of the parent folder containing “code.cmd”. The term “code.cmd” could be replaced with “java”, “cmd”, “powershell”… Continue reading Get full path of executable in PATH variable
Debugging with PowerShell
I see a huge demand for automation even in areas that are not primarily associated with software development or IT in general. And I also see people getting more and more interested in scripting and coding to get annoying, repetitive and boring tasks done more easily and robust. There is only one drawback: Code that… Continue reading Debugging with PowerShell