title: Issue with setting ADMIN password on Windows CE
body: <p>I have wrote a user manager script the uses <a href="http://msdn.microsoft.com/en-us/library/ms926215.aspx" rel="nofollow noreferrer"><code>NTLMSetUserInfo</code></a> to set passwords of some users, including <code>ADMIN</code>... What I have noticed though is that if I do this the username / password combination works perfectly for all scenarios such as Telnet, HTTP Auth etc but NOT file browsing.</p>
  
  <p>Upon further inspection I noticed that when setting the Admin password through the built in CE configuration web pages it works.</p>
  
  <p>The registry for Admin looks like so when I use <code>NTLMSetUserInfo</code></p>
  
  <pre><code>NT = [hex value]
  </code></pre>
  
  <p>The registry for Admin contains an extra field, <code>Password</code> when I set the admin password via the CE web pages.</p>
  
  <pre><code>NT = [hex value]
  Password = [hex value]
  </code></pre>
  
  <p>I figure <code>NTLMSetUserInfo</code> doesn't set the global CE password for Admin properly, hence not being able to file browse onto the box.</p>
  
  <p>I found the following function in the CE web code parsing DLL that does the job called <a href="http://msdn.microsoft.com/en-us/library/aa915490.aspx" rel="nofollow noreferrer"><code>SetPassword</code></a>.  I wrote a separate function to deal with Admin cases but I cannot get it to compile.  Here is a snippet of it</p>
  
  <pre><code>#include &lt;windbase.h&gt;
  
  bool UserAccounts::SetAdminPassword(const std::string &amp;passwordOld, const std::string &amp;password)
  {
      wchar_t wpass[512];
      wchar_t wpassold[512];
  
      mbstowcs(wpass, password.c_str(), 512);
      mbstowcs(wpassold, passwordOld.c_str(), 512);
  
      return SetPassword(wpassold, wpass) == TRUE;
  }
  </code></pre>
  
  <p>This will not compile stating that <code>'SetPassword': identifier not found</code>.  I notice in the <a href="http://msdn.microsoft.com/en-us/library/aa915490.aspx" rel="nofollow noreferrer">CE documentation for <code>SetPassword</code></a> it has the following line</p>
  
  <blockquote>
    <p>To use this function, you must include
    the password component, Fspass, in
    your Cesysgen.bat file.</p>
  </blockquote>
  
  <p>I'm not sure what this means as I am pretty new to PlatformBuilder etc...</p>
  
  <p>Can anyone help me or point me in the right direction?</p>