Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Windows system directory variable

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Common variables:

%CD% : Lists the current directory.

%DATE% : Lists the current date.

%COMPUTERNAME% : lists the computer name.

%system% = C:\WINDOWS\SYSTEM32

%TIME% : Lists the current time.

%OS% System returns the operating system name. Windows 2000 displays its operating system as Windows_NT.

%PATH% The system specifies the search path for executable files.

%HOMEPATH% : Lists the full path to the user's home directory.

%WINDIR% The system returns the location of the operating system directory.

%SYSTEMROOT% The system returned the location of the Windows server operating system root directory.

Infrequently used variables:

%HOMEDRIVE% = C:\Partition of the currently booted system

%SystemRoot% = C:\WINDOWS Directory where the currently booted system is located

%USERPROFILE% = C:\Documents and Settings\sihochina Current user data variables

%HOMEPATH% = C:\Documents and Settings\sihochina Current user environment variables

%ALLUSERSPROFILE%: Lists the location of the profile file.

%APPDATA% : Lists the default storage location for application data.

%CLIENTNAME% : Lists the NETBIOS name of the client when connecting to a Terminal Services session.

%CMDCMDLINE% : Lists the command lines used to launch the current cmd.exe.

%CMDEXTVERSION% : Command out the current command processor extension version number.

%CommonProgramFiles% : Lists folder paths for frequently used files.

%COMSPEC% : lists the path to the executable command shell (command processor).

%ERRORLEVEL% : lists error codes for most recently used commands.

%HOMEDRIVE% : Lists the drive letters associated with the user's home directory.

%HOMESHARE% : Lists the network path to the user's shared home directory.

%LOGONSEVER% : Lists valid domain controller names for the current login session.

%NUMBER_OF_PROCESSORS% : Lists the number of processors installed on the computer.

%PATHEXT% : Lists file extensions that the operating system considers executable.

%PROCESSOR_ARCHITECTURE% : Lists the chip architecture of the processor.

%PROCESSOR_IDENTIFIER % : lists the processor description.

%PROCESSOR_LEVEL% : Lists the processor model of the computer.

%PROCESSOR_REVISION% : Lists the revision number of the processor.

%ProgramFiles% : lists the path to the Program Files folder.

%PROMPT% : lists the command prompt settings for the current command interpreter.

%RANDOM% : Lists random decimal numbers between 0 and 32767.

%SYSTEMDRIVE% : lists the drives where Windows boot directories are located.

%SYSTEMROOT% : Lists the location of the Windows startup directory.

%TEMP% and %TMP% : lists the default temporary directory of applications available to the currently logged in user.

%USERDOMAIN% : lists the names of the domains that contain the user account.

%USERNAME% : Lists the name of the currently logged in user.

%USERPROFILE% : Lists the current user profile location.

%ALLUSERSPROFILE% Locally returns the location of the All Users profile.

%APPDATA% Local Returns where the application stores data by default.

%CMDCMDLINE% Local Returns the exact command line used to launch the current Cmd.exe.

%CMDEXTVERSION% The system returned the version number of the current Command Processor Extension.

%COMPUTERNAME% The system returns the name of the computer.

%COMSPEC% The system returns the exact path of the command line interpreter executable.

%DATE% The system returns the current date. Use the same format as the date /t command. Generated by Cmd.exe. For more information about the date command, see Date.

%ERRORLEVEL% The system returned the error code for the previous command. Non-zero values are usually used to indicate errors.

%HOMEDRIVE% The system returned the drive letter of the local workstation connected to the user's home directory. Set based on home directory values. The user home directory is specified in Local Users and Groups.

%HOMEPATH% The system returns the full path to the user's home directory. Set based on home directory values. The user home directory is specified in Local Users and Groups.

%HOMESHARE% The system returned the network path to the user's shared home directory. Set based on home directory values. The user home directory is specified in Local Users and Groups.

%LOGONSERVER% Local Returns the name of the domain controller that authenticates the current login session.

%NUMBER_OF_PROCESSORS% The system specifies the number of processors installed on the computer.

%PATHEXT% The system returns a list of file extensions that the operating system considers executable.

%PROCESSOR_ARCHITECTURE% The system returns the chip architecture of the processor. Value: x86 or IA64 (based on Itanium).

%PROCESSOR_IDENTIFIER % The system returned a processor description.

%PROCESSOR_LEVEL% The system returns the model number of the processor installed on the computer.

%PROCESSOR_REVISION% The system returned the version number of the processor.

%PROMPT% Local Returns the command prompt settings for the current interpreter. Generated by Cmd.exe.

%RANDOM% The system returns any decimal number between 0 and 32767. Generated by Cmd.exe.

%SYSTEMDRIVE% The system returns a drive that contains the Windows server operating system root directory (that is, the system root directory).

%TEMP% and %TMP% The system and user returns the default temporary directory used by applications available to the currently logged on user. Some applications require TEMP, while others require TMP.

%USERDOMAIN% Local Returns the name of the domain containing the user account.

%USERNAME% Local Returns the name of the currently logged in user.

%USERPROFILE% Local Returns the location of the profile for the current user.

-----------

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 253

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report