how to verify if a local user exists or not from batch file. RRS feed

  • Question

  • Hi,

    I am creating a local user on windows server 2003 from batch file as part of installation of a software. for that I am using the command..


    Net user Tempgp Ring123 /add /fullname:"Tempgp" /comment:"Temporary User for gp extraction process."

    if the username already exists the script fails.. failing my installation process.

    Can someone let me know how to verify if a local username already exists or not from the batch file before creating the username. so that I can avoid failure in my batchfile.





    Monday, June 13, 2011 2:43 PM


All replies