中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-13 14:41
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » Who can list things like %temp%, %windir%, SystemRoot% and so on?
Printable Version  3,172 / 18
Floor1 yd3141128 Posted 2006-11-22 11:36
新手上路 Posts 7 Credits 17
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 ]
Floor2 electronixtar Posted 2006-11-22 12:21
铂金会员 Posts 2,672 Credits 7,493
Floor3 yd3141128 Posted 2006-11-22 12:30
新手上路 Posts 7 Credits 17
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.
Floor4 lxmxn Posted 2006-11-22 13:23
版主 Posts 4,938 Credits 11,386
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.
Floor5 不得不爱 Posted 2006-11-22 21:56
超级版主 Posts 2,044 Credits 5,310 From 四川南充
It should be represented as "%userprofile%\Desktop", the LZ missed a "".
Floor6 srleopard Posted 2006-11-23 01:28
初级用户 Posts 15 Credits 29
After testing, it should be "%userprofile%\Desktop"
Floor7 srleopard Posted 2006-11-23 01:31
初级用户 Posts 15 Credits 29
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.
Floor8 woof Posted 2006-11-23 04:06
新手上路 Posts 5 Credits 12
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...
Floor9 tao0610 Posted 2006-11-23 05:02
高级用户 Posts 218 Credits 579
%userprofile%\Desktop is the desktop of the current user!

It seems there is no specific environment variable that specifies the administrator!
Floor10 electronixtar Posted 2006-11-23 06:53
铂金会员 Posts 2,672 Credits 7,493

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

The administrator is the default "C:\Documents And Settings\Administrator\"
Floor11 lxmxn Posted 2006-11-23 13:18
版主 Posts 4,938 Credits 11,386
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"
Floor12 tao0610 Posted 2006-11-23 13:38
高级用户 Posts 218 Credits 579
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.
Floor13 lxmxn Posted 2006-11-23 14:30
版主 Posts 4,938 Credits 11,386
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.
Floor14 oilio Posted 2007-01-13 02:57
高级用户 Posts 303 Credits 641
"%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 ]
Floor15 wuyugui Posted 2007-01-15 22:57
初级用户 Posts 8 Credits 20
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!!
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023