Advertisement

Add Batch file (*.bat) to New menu of File Explorer

In this article, we will see how to get a useful context menu item to create a New -> Batch file. It will save you time if you need to create them from time to time. You get a new file with the BAT extension instantly with one click.

How to check in a batch file if you are running it elevated

Sometimes it is useful to check in a batch file if it was started from an elevated command prompt or as an administrator. I would like to share with you a trick which I am using to do this. The main idea of my trick is based on the value of the special environment variable %errorlevel% which stores the exit code for most console apps and commands. Let's see this in action.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.