Re: Covert %username% to hex in logon script

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Don Grover (dgrover_at_assoft.com.au)
Date: 11/24/04


Date: Wed, 24 Nov 2004 20:40:20 +1100

Convert username to Unicode first.

"Art Vandelay" <idozaf@gmail.com> wrote in message
news:30iq7cF30o3foU1@uni-berlin.de...
> Hi there,
> At a school we need to alter the registered User Information for the
> Office suite during logon. We want the %username% value to be imported
> into the following key:
> HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\common\UserInfo altering
> the REG_BINARY UserName
>
> Unfortunately the conversion isn't straight hex either, but as with all
> REG_BINARYs there is a 00 between every character. So for example the word
> "Example" is not imported as
> 45 78 61 6D 70 6C 65
>
> but as:
>
> 45 00 78 00 61 00 6D 00 70 00 6C 00 65 00 00 00
>
> Any idea how we can go about doing this?
> Thanks.
> Art
>



Relevant Pages

  • RE: Windows2000 Security event logs
    ... field really populated with the datum username or is ... Subject: Windows2000 Security event logs ... Special privileges assigned to new logon: ... Logon Type: 3 ...
    (Security-Basics)
  • Re: how to pass nt password ?
    ... i logon in xp, run the service locally on xp1 local machine. ... reach out to other machines having similar services and check whether it is ... f) the logonuser fucntion requires username, ... > with the minimum credentials required to operate). ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Password access for folders over network
    ... the network logon always uses the currently logged on user ... but you *can* get it to prompt for the password. ... username, ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Data Type mismatch error?
    ... reference to the DAO ... > 'Your message/actions here for invalid logon ... >you have to step through every record in the recordset ... >> I have logon box which when the user enters a username ...
    (microsoft.public.access.modulesdaovba)
  • Re: Share Point & CRM
    ... I can see that when I try to logon the username area flicks to ... > SBS Newsgroups: ... >>> Installing and Securing Microsoft CRM 1.2 on a Windows Small Business ...
    (microsoft.public.windows.server.sbs)