China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-13 14:53
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Who can list things like %temp%, %windir%, SystemRoot% and so on? View 3,174 Replies 18
Original Poster Posted 2006-11-22 11:36 ·  中国 河南 南阳 联通
新手上路
Credits 17
Posts 7
Joined 2006-09-18 04:07
19-year member
UID 62921
Status Offline
Things like this expression, what else is there? For example: What is used to represent "c:\Documents and Settings\Administrator\桌面"

[ Last edited by yd3141128 on 2006-11-22 at 12:17 PM ]
Floor 2 Posted 2006-11-22 12:21 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2006-11-22 12:30 ·  中国 河南 南阳 联通
新手上路
Credits 17
Posts 7
Joined 2006-09-18 04:07
19-year member
UID 62921
Status Offline
Thanks, but I haven't found how to represent c:\Documents and Settings\Administrator\Desktop\ yet. I used %userprofile%\Desktop, but the file was copied to c:\Desktop.
Floor 4 Posted 2006-11-22 13:23 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by yd3141128 at 2006-11-22 12:30:
Thanks, but I haven't found how to represent "c:\Documents and Settings\Administrator\Desktop" yet. I used %userorofile%\Desktop, but the file was copied to "c:\Desktop".


  Take a close look at your environment variables. It should be: %userprofile%\Desktop.
Floor 5 Posted 2006-11-22 21:56 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 6 Posted 2006-11-23 01:28 ·  中国 江西 上饶 电信
初级用户
Credits 29
Posts 15
Joined 2006-11-21 09:35
19-year member
UID 71243
Gender Male
Status Offline
After testing, it should be "%userprofile%\Desktop"
Floor 7 Posted 2006-11-23 01:31 ·  中国 江西 上饶 电信
初级用户
Credits 29
Posts 15
Joined 2006-11-21 09:35
19-year member
UID 71243
Gender Male
Status Offline
The Bible of the command line: Start/Run hh ntcmds.chm::/ntcmds.htm
This is too amazing. I've looked for so many tutorials, and now I just realized that the tutorials are right at hand.
Floor 8 Posted 2006-11-23 04:06 ·  中国 江苏 南京 联通
新手上路
神話
Credits 12
Posts 5
Joined 2006-11-22 21:37
19-year member
UID 71389
Gender Male
Status Offline
Originally posted by srleopard at 2006-11-22 12:31 PM:
The Bible of the command line: Start/Run hh ntcmds.chm::/ntcmds.htm
This is too amazing. I've looked for so many tutorials, and now I just realized that the tutorial is right at hand.


Thanks for sharing, but I can't help you add points...
Floor 9 Posted 2006-11-23 05:02 ·  中国 北京 朝阳区 联通
高级用户
★★
朦胧的世界
Credits 579
Posts 218
Joined 2006-10-24 04:29
19-year member
UID 67972
Status Offline
%userprofile%\Desktop is the desktop of the current user!

It seems there is no specific environment variable that specifies the administrator!

认识自己,降伏自己,改变自己
,才能改变别人!
Floor 10 Posted 2006-11-23 06:53 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline

It seems there is no specific environment variable that specifies the administrator!

The administrator is the default "C:\Documents And Settings\Administrator\"

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 11 Posted 2006-11-23 13:18 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by electronixtar at 2006-11-23 06:53:

The administrator defaults to "C:\Documents And Settings\Administrator\"


  Can this be seen?

  "%userprofile%\..\Administrator\Desktop"
Floor 12 Posted 2006-11-23 13:38 ·  中国 北京 朝阳区 联通
高级用户
★★
朦胧的世界
Credits 579
Posts 218
Joined 2006-10-24 04:29
19-year member
UID 67972
Status Offline
Administrator defaults to "C:\Documents And Settings\Administrator\"


If it only works when logged in as an administrator, it's better to just write the absolute path directly.

认识自己,降伏自己,改变自己
,才能改变别人!
Floor 13 Posted 2006-11-23 14:30 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by tao0610 at 2006-11-23 13:38:


If it only works when limited to the administrator login, it is better to directly write the absolute path.


  I think the code on the 11th floor is more universal. It works for any user, while yours can only be used by the administrator.
Floor 14 Posted 2007-01-13 02:57 ·  中国 江苏 连云港 电信
高级用户
★★★
前进者
Credits 641
Posts 303
Joined 2007-01-10 02:57
19-year member
UID 76009
Gender Male
Status Offline
"%userprofile%\Desktop, or "%userprofile%"\Desktop, both are okay. The owner can try.

The method of lxmxn is correct. It's a pity that my C drive is an NTFS volume. I used the command cd "%userprofile\..\administrator\Desktop", and the command was successful, but it didn't let me enter, and there came out the familiar four words "Access is denied".

[ Last edited by oilio on 2007-1-18 at 01:44 PM ]
我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿!
Floor 15 Posted 2007-01-15 22:57 ·  中国 广西 桂林 电信
初级用户
Credits 20
Posts 8
Joined 2007-01-01 06:34
19-year member
UID 75166
Gender Male
Status Offline
If the system is installed on C:\, then %USERPROFILE% refers to your user profile directory, generally referring to the directory "C:\Documents and Settings\Your username". If you go to the directory "C:\Documents And Settings\Administrator\", it can be reached with %USERPROFILE% when logged in as Administrator. If logged in with other identities, some characters need to be removed: remove "login username" and replace it with "Administrator". I still don't understand how to operate. I don't know much about this DOS!! Ashamed!!
Forum Jump: