Run application with Administrative privileges.
-
Start a console with Administrative privileges.
sudow
-
Run application with Administrative privileges.
sudow myapp.exe -t 0 -n 10
gpedit.msc
shall be used to grand the user the privilege to create links.
If the link exists, the link is removed first, then a new link is created.
-
Make symbolic link
CALL MakeLink :MakeSymboliclink "path-of-sym-link" "path-to-target-file"
-
Make hard link
CALL MakeLink :MakeHardlink "path-of-hard-link" "path-to-target-file"
-
Make junction
CALL MakeLink :MakeJunction "path-of-junction" "path-to-target-directory"
-
Add the current directory to the user's
PATH
add-path.ps1
-
Add the current directory to the system
PATH
add-path.ps1 -sys
-
Install (Windows Terminal)[https://github.com/microsoft/terminal].
-
Build
wtd.c
towtd.exe
. -
Added the path to
wtd.exe
into thePATH
environment variable.
-
Start Windows Terminal in the current directory
In the Windows explorer, press
Alt-d
, inputwtd
, thenEnter
.
-
Use the latest version of Visual Studio.
SetVcEnv
-
Use specific version of Visual Studio.
SetVcEnv 16 x86
-
Show help
SetVcEnv /?
-
Provided environment variables
VC_VER_FULL e.g., 193431935 VC_VER_STD e.g., 1934 VC_VER_MAJOR e.g., 19 VC_VER_MINOR e.g., 34 VC_VER_BUILD e.g., 31935 VC_VER_STRING e.g., 19.34.31935 OS_CAPTION e.g., Microsoft Windows 10 OS_ARCH e.g., 64-bit OS_VER e.g., 10.0.19045 OS_BUILD e.g., 19045
See higher-level function invocation for Windows batch script.
-
ValueEcho
Echo a value.
-
ValueEq
Test the equality of two values.
SET A=xxx SET B=xxx CALL Envvar :ValueEq "%%A%%" "%%B%%"
Then
ERRORLEVEL
becomes1
. -
ValueFind
Find a substring in a value.
-
ValueTokenize
Tokenize a value, and process each token.
-
EnvvarEcho
Echo the value of an environment variable.
-
EnvvarIs
Check the value of an environment variable.
SET A=xxx SET B=xxx CALL Envvar :EnvvarIs "B" "%%A%%"
Then
ERRORLEVEL
becomes1
. -
EnvvarFind
Find a substring in an environment variable.
-
EnvvarClear
Undefine an environment variable.
-
EnvvarSet
Set the value of an environment variable.
SET A=0123 CALL Envvar :EnvvarSet "B" "%%A:~0,-1%%"
Then the value of
B
becomes012
. -
EnvvarCopy
Set the value of an environment variable to another.
SET A=xxx CALL Envvar :EnvvarCopy "A" "B"
Then the value of
B
becomesxxx
. -
EnvvarPrepend
Prepend a string to the value of an environment variable.
-
EnvvarAppend
Append a string to the value of an environment variable.
-
EnvvarTokenize
Tokenize an environment variable, and process each token.
-
EnvvarPathPrepend
Prepend a path to an environment variable.
SET INCLUDE=C:\MyLib\include CALL Envvar :EnvvarPathPrepend "INCLUDE" "C:\Lua-5.4\include"
Then the value of
INCLUDE
becomesC:\Lua-5.4\include;C:\MyLib\include
. -
EnvvarPathAppend
Append a path to an environment variable.
SET INCLUDE=C:\Lua-5.4\include;C:\MyLib\include CALL Envvar :EnvvarPathAppend "INCLUDE" "C:\Python-3.11\include"
Then the value of
INCLUDE
becomesC:\Lua-5.4\include;C:\MyLib\include;C:\Python-3.11\include
. -
EnvvarPathRemove
Remove a path from an environment variable.
SET INCLUDE=C:\Lua-5.4\include;C:\MyLib\include;C:\Python-3.11\include CALL Envvar :EnvvarPathRemove "INCLUDE" "C:\MyLib\include"
Then the value of
INCLUDE
becomesC:\Lua-5.4\include;C:\Python-3.11\include
. -
EnvvarPathWin
Use Windows path separator (a.k.a. backslash).
The trailing backslash is also removed.CALL Envvar :EnvvarPathWin "PUB" "C:/pub/bin/"
Then the value of
PUB
becomesC:\pub\bin
. -
EnvvarPathNix
Use Unix/Linux path separator (a.k.a. slash).
The trailing slash is also removed.CALL Envvar :EnvvarPathNix "PUB" "C:\pub\bin\"
Then the value of
PUB
becomesC:/pub/bin
.