четверг, 28 ноября 2019 г.

Environment variables for PATH

First, we will be engaged in showing a path,
then we will advance to setting a path.

To show the path in CMD, use these commands:
PATH
or
SET PATH
(the last command adds info about path extensions, such as .COM;.EXE;.BAT;.CMD, etc)

If you want to show a path in a fine manner (row by row), use the next formula:
echo %PATH:;=&echo.%


In the PowerShell you need to use another command:
echo $Env:PATH


There is a more modern command SETX, for example:
setx path "%PATH%;C:\path\to\directory\"

For setting a path permanently, you may add /M switch:
setx /M path "%PATH%;C:\path\to\directory\"

That's all for today.


вторник, 19 ноября 2019 г.

RDP configuration

If you frequently use RDP connections, you may find a specialized application helpful, but there are times when regular RDP connections are necessary. In such cases, the following tips may prove useful.

·         Start Remote Desktop in full-screen mode: mstsc /f
·         Start Remote Desktop in Admin Mode: mstsc /admin
·         Matches your Remote Desktop session with the local virtual desktop: mstsc /span
·         Matches your Remote Desktop session to the Client Layout: mstsc /multimon
·         Open the .RDP file for editing—change “connection file” to your file name before running the command: mstsc /edit “connection file”

Once your Remote Desktop connection is established, you can use the following shortcuts:

·         Switches your Remote Desktop client between full-screen and windowed mode: Ctrl + Alt + Pause
·         Force the Remote Desktop into full-screen mode: Ctrl + Alt + Break
·         Takes a screenshot of the active Remote Desktop window: Ctrl + Alt + Minus
·         Takes a screenshot of the entire Remote Desktop: Ctrl + Alt + Plus
·         Reboots the remote computer: Ctrl + Alt + End

·         autoreconnection enabled:i:1
·         autoreconnect max retries:i:200
·         connection type:i:6 (LAN 10Mbps or higher)
·         connection type:i:7 (Automatic bandwidth detection)
·         networkautodetect:i:0
To specify a pre-defined window size for your Remote Desktop connection, add the following option:
·         desktop size id:i:[option number]
·         smart sizing:i:1
·         keyboardhook:i:1
·         redirectclipboard:i:1