when using command prompt net user commands
#1
Posted 09 October 2008 - 08:46 AM
For e.g: if i launch the net user command it normally states the accounts that are on the pc.
so say for this instance the accounts on the windows machine are : Administrator, John, sharon, K & S Towne and off course the normal help accounts which are default .
given that John has Admin privilages and sharon and K & S Towne are limited users.
when im logged in as the Administrator ( which normally is hidden from view ) and all the other accounts are password protected, i usually use the " net user John * " then the return key twice to remove the passwords depending on who or what i, doing , the problem is now. How do i execute any such commands on the K & S Towne Account ? As many times that ive met accounts with more than one word the net user command does work with them. is there a way to execute the net user command on Accounts which have multiple word or names on its ID E.G ( K & S Towne )
Any help will be good !!
#2
Posted 09 October 2008 - 08:59 AM
Net user "K & S Towne" .......
#3
Posted 09 October 2008 - 09:10 AM
If the quotes do not work, you can try "escaping" the character, using && instead.
jaclaz
#4
Posted 09 October 2008 - 09:54 AM
#5
Posted 09 October 2008 - 11:32 AM
Quote
will not interpret properly a command line like:
Quote
as:
1st parameter=param1
2nd parameter=para
3rd parameter=m2
4th parameter=param3
By placing quotes around "para m2" you will obtain:
1st parameter=param1
2nd parameter=para m2
3rd parameter=param3
so with "normal" characters everything will be allright, but if a "reserved" character is used like %&<>=|^ to list a few, putting the two (or three) words between quotes may not be enough.
jaclaz
#6
Posted 09 October 2008 - 01:14 PM
Net user "K %& S Towne" ....... ???
Sometimes the percent sign helps
#7
Posted 09 October 2008 - 01:25 PM
Nois3, on Oct 9 2008, 09:14 PM, said:
Net user "K %& S Towne" ....... ???
Sometimes the percent sign helps
Well, NO.
The percent sign is the reserved character used to indicate a variable....
There are usually two ways to "escape" special characters, either "doubling" them like in "&&" or using the caret, like in "^&", (I presume that the second may work in this case) but the only way to know if either work would be to test them.
jaclaz
#8
Posted 09 October 2008 - 03:06 PM
Quote
QUOTE
program.exe param1 param2 param3
will not interpret properly a command line like:
QUOTE
program.exe param1 para m2 param3
as:
1st parameter=param1
2nd parameter=para
3rd parameter=m2
4th parameter=param3
By placing quotes around "para m2" you will obtain:
1st parameter=param1
2nd parameter=para m2
3rd parameter=param3
i more lost now than when i started ..lol
an example will do guys and as i said b4 i also get this problem when the account name is 2 words for example " tall man "
you know it is very easy to create a limited account on your machine an try doing what i say im getting the problem with , for hands on experience
#9
Posted 09 October 2008 - 05:18 PM
net user "john smith" *
Enter password now (prob shows up in ********)
Confirm Password now (again will appear hidden in ********)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Example 2 for username: John & Joe to reset password type
net user "john && joe" *
Enter password now (prob shows up in ********)
Confirm Password now (again will appear hidden in ********)
If above example 2 fails try the following but I have always used the double and &&
net user "john ^& joe" *
Enter password now (prob shows up in ********)
Confirm Password now (again will appear hidden in ********)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Can I just ask why this is a problem for you?
This post has been edited by mafadecay: 09 October 2008 - 05:19 PM
#10
Posted 09 October 2008 - 07:10 PM
ill tell u which one worked !!
#11
Posted 10 October 2008 - 03:21 AM
Reserved characters can be escaped with ^, eg ^& or ^" or ^%. The variable %% expands to %.
& separates commands on the same line, eg echo hi & goto :end
&& is a conditional &, the second command is executed if the first succeeds.
|| is a conditional or, ie "do something || echo something failed." will say 'something failed' only when it fails.
- ← How to retrive deleted data after merging partitions
- Windows XP
- desperate help needed ...extremely urgent →



Help

Back to top









