- Prison Code Breaker Diary -

=> aka: Nhật Kí Code Tù

Categories

All information about the environment variable is stored in '$env'.
When you want to retrieve info about any variable, you can follow the syntax

$env:<variable_name>

Here's an example how to use it:


PS C:\> $env:windir
C:\Windows

PS C:\> $env:path
C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\ActiveState Perl Dev Kit 8.0\bin;
C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\
Bpl\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Program Files\M
icrosoft SQL Server\90\Tools\binn\;C:\Web\PHP;C:\Web\PHP\ext;C:\Web\MySQL\bin;C
:\Program Files\QuickTime\QTSystem\;C:\GTK\bin;C:\Program Files\Microsoft Visua
l Studio 8\VC\bin;C:\Program Files\Java\jdk1.6.0_18\bin;C:\GTK2-16\bin;C:\Windo
ws\System32\WindowsPowerShell\v1.0\;C:\Program Files\GTK2-Runtime\bin;C:\BC5\BI
N;C:\Program Files\Nmap;C:\Program Files\Common Files\Nero\Lib\

0 comments

Post a Comment