Re: wierd batch file behavior
- From: "Pegasus" <I.can@xxxxxxx>
- Date: Tue, 29 May 2007 07:28:14 +1000
"Sasi" <Sasi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D4087070-D3C9-482F-8CD1-E1C99BC5E102@xxxxxxxxxxxxxxxx
this is the batch file I've written:
net user /add Admin ~!@#$%^&*()_+
net user Admin ~!@#$%^&*()_+
net localgroup Administrators /add Admin
net user /add Admin ~!@#$%^&*()_+ /domain
net user Admin ~!@#$%^&*()_+ /domain
net localgroup Administrators /add Admin /domain
it is supposed to create an account named "Admin" in case of laking such
account,set and/or change its password to the 13 consequent keys of the
upper
row of a standard keyboard (tilda,exlamation,at sign,sharp,and etc till
backspace),and finally make that account an administrator.
the problem is that the account is created and it IS joined to the
administrators group,both locally and on domain;but the password is not
set
as expected.I tried everything I would think of,but none was the password
it
has set.
I want to know ,considering exactly the script text above,what the Admin
password would be.
I've scheduled this batch file to be run every week on a remote computer
and
I have no access to it to change the designated password,so I need to
recover
this password.
The behaviour you observe is not weird at all - it is fully
expected. Among the password characters you use you
have several "poison" characters, e.g. !%^&. They all
have a special meaning in batch file. "&" for example will
concatenate two batch file commands whereas % will
precede an environmental variable.
Your best bet is to reset the passwords to a value that
does NOT include any poison characters, and most
importantly to TEST your batch file before you turn it
lose!
.
- Prev by Date: Re: wierd batch file behavior
- Next by Date: Re: Killing password dialog box on booting 2000 Pro, running on 1
- Previous by thread: Re: wierd batch file behavior
- Index(es):
Relevant Pages
|
Loading