|
Answer» i got this batch file to create a local user login ACCOUNT , the account that i created .. the password never EXPIRES is never checked. How to create a batchfile that create a local login with password never expires?
@echo off if exist c:\windows\avdone.usr goto done net user supportdept spp123 /add net localgroup administrators supportdept /add echo hello > c:\windows\avdone.usr :doneNightShyamalan:
Good to see you back. Your request really needs to be done with a script; specifically a WMI Script. But SINCE you want batch language, check out this site:
http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds4/net.htm#HDRUSER
It explains everything you'll ever need to know about the NET command.
Good luck. @echo off if exist c:\windows\avdone.usr goto done net user supportdept spp123 /add /expires:never net localgroup administrators supportdept /add echo hello > c:\windows\avdone.usr
does this work?? i just addes /expires:never but the setting is not checked at the username properties.I could not find that Expires is a parameter of the NET command. Do yourself a FAVOR a download the Portable Script Center from:
http://www.microsoft.com/technet/scriptcenter/createit.mspx
It's more help than you thought possible. ALSO shouldn't the NET statements in your file be flipped (create the localgroup before the user?).
Hope this helps. awsome site sidewinder ... thanks for your help
|