title: Create user account with VBScript
body: <p>I'm using this code to create user account,</p>
  <pre><code>Function CreateUserAccount (acc, paas)
  
       Dim WinUserAccountName, WinUserAccountPass
      
       WinUserAccountName = Session.Property(&quot;WIN_USER_ACCOUNT&quot;)
       WinUserAccountPass = Session.Property(&quot;WIN_USER_PASS&quot;)
      
       strComputer = &quot;.&quot;
       set objSystem = GetObject(&quot;WinNT://&quot; &amp; strComputer)
       set objUser = objSystem.Create(&quot;user&quot;, WinUserAccountName)
       objUser.SetPassword WinUserAccountPass
       objUser.SetInfo
      
  End Function
  </code></pre>
  <p>It works OK so far, the only thing I need to implement is:</p>
  <ol>
  <li>When the user name is already in the machine. Display message to the user telling him/her that this user name is already exist.</li>
  </ol>
  <p>How can I do that in VBScript? Is there error code I can catch?</p>
  <p>Thanks,</p>