Question: how can I use a DOS batch file to get the current username of the XP system, and then replace administrator in MirrorDir.ini?
The commands I know so far are:
echo %username% display the current username
echo %username%>a.txt append the displayed result to a.txt
But how can I use a batch file to replace administrator in MirrorDir.ini with the current XP system username?
Requirement: as soon as the batch file is run, it should immediately modify MirrorDir.ini.
I don't want to use other software to do it, many thanks.
The contents of MirrorDir.ini are as follows:
LastTask=0
MainDir=C:\Documents and Settings\Administrator\Desktop
ImageDir=d:\0beifen
MainDirHistory=C:\Documents and Settings\Administrator\Desktop
ImageDirHistory=d:\0beifen
Excludes=
StartupRun=1
DeleteOthers=1
[ Last edited by ygqiang on 2010-4-17 at 07:41 ]
The commands I know so far are:
echo %username% display the current username
echo %username%>a.txt append the displayed result to a.txt
But how can I use a batch file to replace administrator in MirrorDir.ini with the current XP system username?
Requirement: as soon as the batch file is run, it should immediately modify MirrorDir.ini.
I don't want to use other software to do it, many thanks.
The contents of MirrorDir.ini are as follows:
LastTask=0
MainDir=C:\Documents and Settings\Administrator\Desktop
ImageDir=d:\0beifen
MainDirHistory=C:\Documents and Settings\Administrator\Desktop
ImageDirHistory=d:\0beifen
Excludes=
StartupRun=1
DeleteOthers=1
[ Last edited by ygqiang on 2010-4-17 at 07:41 ]


