[THIN] Re: Office Username Dialog box




I also wrote a kix script to do this :) This one woks for Office XP, so you
will just need to change the registry key to suite Ofiice 2003. Works like
a charm.

-----START OF SCRIPT------------

; This script converts a users Full Name (first and last) to a value that
can be placed in a
; REG_BINARY registry key. To do this, each character is converted to ASCII
and then to HEX.
; Because it's a double byte value, a 00 is added after each hex value and
a 0000 is added
; to the end of the completed hex values.
; e.g. Jeremy Saunders =
4A006500720065006D00790020005300610075006E0064006500720073000000
; Written by Jeremy.Saunders@xxxxxxxxxxx (formally from Logicalis) on
27/8/2003.
; The CnvtBase function was found at...
;
http://www.scriptlogic.com/kixtart/FunctionLibrary_ViewFunction.aspx?ID=CnvtBase

$user=@fullname
$length=len($user)
FOR $x = 1 TO $length
  $string = SubStr($user,1,$x)
  $ASCII = ASC(right($string,1))
  $HEX=CnvtBase($ASCII,10,16)+0+0
  $FINALHEX=$FINALHEX+$HEX
NEXT
$commentsdata=$FINALHEX+"0000"
$commentskey="HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\MailSettings"
$commentsvalue="MarkCommentsWith"
$comments=READVALUE($commentskey, $commentsvalue)
If $comments <> $commentsdata
  WRITEVALUE($commentskey, $commentsvalue, $commentsdata, "REG_BINARY")
ENDIF

FUNCTION CnvtBase ($strnum, OPTIONAL $intob, OPTIONAL $intnb)
  ;*********************************************************
  ;* Function name..: CnvtBase()
  ;* Author.........: W.M. Hinsch (wmarkh@xxxxxxx)
  ;* Created........: 2001/03/19
  ;* Modified.......: 2001/04/27
  ;* Called by......: None
  ;* Calls..........: None
  ;* Comment........: Converts any base (2-36)
  ;                   into any other base (2-36)
  ;*********************************************************
  ; Limit the scope of variables to this function...
  ; these should probably be retained even if the code is trimmed.

  DIM $stralpha,$strnew,$strdigit,$stroldnum,$strsign
  DIM $intpos,$intdigval,$intb10,$intplcnum,$intctr
  DIM $intoldbase,$intnewbase,$varremain

  ; Assign parameters to local variables. This does some basic error-
  ; prevention by forcing the variables to the correct data type.
  $stroldnum = "" + $strnum ; cast to string
  $intoldbase = 0 + $intob ; cast to number
  $intnewbase = 0 + $intnb ; cast to number

  ; Initialize variables. The only variables which really need to be
  ; initialized are $strAlpha and $intPlcNum. The rest are for clarity
  ; and to make converting to other languages easier.
  $intpos = 0 ; Position starting at LSD to MSD
  $intdigval = 0 ; Base 10 Value of digit
  $intb10 = 0 ; Base 10 Number
  $intplcnum = 1 ; Value of oldbase raised to intPos power
  $stralpha = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  $strnew = "" ; "Number" in new base
  $strsign = "" ; Holds the leading hyphen (-) from strOldNum
  $strdigit = "" ; "Digit" at intPos, including Alpha characters

  ; If negative numbers will not be used, this may be eliminated.
  IF Substr($stroldnum,1,1) = "-"
    $strsign = Substr($stroldnum,1,1)
    $stroldnum = Substr($stroldnum,2,Len($stroldnum) - 1)
  ELSE
    $strsign = ""
  ENDIF

  ; This loop checks to make sure all the characters in the supplied
  ; number are alphanumeric. If not, the function exits with a 0 return.
  FOR $intctr = 1 TO Len($stroldnum)
    $strdigit = Substr($stroldnum,$intctr,1)
    IF InStr($stralpha,$strdigit) = 0
      $strnew = 0
      GOTO func_end
    ENDIF
  NEXT

  ; This portion attempts to "guess" the base of the number supplied.
  ; It also handles a bad range supplied for the new base.
  ; If this will be explicitly given at all times, this portion may
  ; be eliminated.
  FOR $intctr = 1 TO 36
    $strdigit = Substr($stralpha,$intctr,1)
    IF InStr($stroldnum,$strdigit)
      $intob = $intctr ; set to the highest digit found so far
    ENDIF
  NEXT
  IF ($intoldbase < 2) OR ($intoldbase > 36)
    SELECT
    CASE ($intob <= 2)
      $intoldbase = 2
    CASE ($intob <= 8)
      $intoldbase = 8
    CASE ($intob <= 10)
      $intoldbase = 10
    CASE ($intob <= 16)
      $intoldbase = 16
    CASE 1
      $intoldbase = $intob
    ENDSELECT
  ENDIF

  ; If the user does not specify a new base, or if the new base is
  ; out of range, base 10 will be used as the default.
  IF ($intnewbase < 2) OR ($intnewbase > 36)
    $intnewbase = 10
  ENDIF
:to_base_10
  $strdigit = Substr("$strOldNum",Len("$strOldNum") - $intpos,1)
  WHILE ("$strDigit" <> "")
    $intdigval = InStr($stralpha,"$strDigit") - 1
    $intb10 = $intb10 + ($intdigval * $intplcnum)
    $intplcnum = $intplcnum * $intoldbase
    $intpos = $intpos + 1
    $strdigit = Substr("$strOldNum",Len("$strOldNum") - $intpos,1)
  LOOP
:to_new_base
  WHILE ($intb10 > 0)
    ; The following line emulates a "$intB10 mod intNewBase" expression
    $varremain = $intb10 - (($intb10 / $intnewbase) * $intnewbase)
    ; This puts the remainder digit in the correct format for bases > 10
    $varremain = Substr($stralpha,$varremain + 1,1)
    $intb10 = $intb10 / $intnewbase
    $strnew = "$varRemain" + "$strNew"
  LOOP
:func_end
  $cnvtbase = $strsign + $strnew
ENDFUNCTION ; - CnvtBase -

-------END OF SCRIPT--------
                                                            
 Kind regards,                                              
                                                            
                                                            
                                                            
 Jeremy Saunders                                            
 Senior Technical Specialist                                
                                                            
 ceruleanTM                                                 
 an IBM Australia Company                                   
 formerly known as Logicalis                                
                                                            
 Level 2, 1060 Hay Street                                   
 West Perth WA 6005                                       
 AUSTRALIA                                                  
                                                            
 Visit us at                                                
 http://www.cerulean.com.au/                                
                                                            
 P:Â +61 8 9261 8412            F:Â +61 8 9261 8536         
 M:Â TBA                        E-mail:                     
                                Jeremy.saunders@xxxxxxxxxxx 
                                                            
                                                            
                                                            
                                                            








                                                                           
             "Michael Boggan"                                              
             <mboggan@hotmail.                                             
             com>                                                       To 
             Sent by:                  thin@xxxxxxxxxxxxx                  
             thin-bounce@freel                                          cc 
             ists.org                                                      
                                                                   Subject 
                                       [THIN] Re: Office Username Dialog   
             01/06/2005 04:51          box                                 
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
                   thin                                                    
                                                                           
                                                                           




I was actually able to do this by doing the following.

-  loged in as administrator
-  opened word and, in the tools - options - user information tab, removed
the username and initials that were there.
-  then closed word
-  change user /install
-  opened word and put a single space in the username section.
-  closed word
-  change user /execute

So far this appears to have done it.

Michael Boggan




>From: Greg Reese <gareese@xxxxxxxxx>
>Reply-To: thin@xxxxxxxxxxxxx
>To: thin@xxxxxxxxxxxxx
>Subject: [THIN] Re: Office Username Dialog box
>Date: Wed, 1 Jun 2005 08:11:03 +1200
>
>Microsoft writes this to the registry in Hex whic makes it a bit of a
>pain to manipulate.  I have a Kix script that worked for me under
>Office 2000 that will probably work for Office 2003 with a little
>tweaking.
>
>I got this from the Kix website a while back.
>
>Greg
>------------------------------------------------------------------------------------------------------------------------------

>
>;Create basic office settings
>
>;Registry locations
>
>$ushelfolders='HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell

>Folders'
>  $userwinkey='HKCU\Software\Microsoft\Windows'
>  $machinewinkey='HKLM\Software\Microsoft\Windows'
>  $mofckey='HKLM\Software\Microsoft\Office\11.0\'
>  $uofckey='HKCU\Software\Microsoft\Office\11.0\'
>  $company='Your Company Name Here'
>
>  MSUSERINFO
>
>  FUNCTION MSUSERINFO()
>
>        ; Process Company Name
>        $x=1
>        $regexp=''
>        WHILE $x<(Len($company)+1)
>           $regexp=$regexp+DecToHex(Asc(SubStr($company,$x,1)))+'00'
>           $x=$x+1
>        LOOP
>        $regexp=$regexp+'0000'
>        $companybin=$regexp
>
>        ; Process FullName
>        $x=1
>        $regexp=''
>        WHILE $x<(Len(@fullname)+1)
>           $regexp=$regexp+DecToHex(Asc(SubStr(@fullname,$x,1)))+'00'
>           $x=$x+1
>        LOOP
>        $regexp=$regexp+'0000'
>        $fullnamebin=$regexp
>        ; Process UserID
>        $useridbin=SubStr(@wuserid,1,2)
>        $x=1
>        $regexp=''
>        WHILE $x<(Len($useridbin)+1)
>           $regexp=$regexp+DecToHex(Asc(SubStr($useridbin,$x,1)))+'00'
>           $x=$x+1
>        LOOP
>        $regexp=$regexp+'0000'
>        $initials=$regexp
>
>          $rc=AddKey($uofckey+$ver+'\Common\UserInfo')
>
>        $regkey=$uofckey+$ver+'\Common\UserInfo'
>
>           $rc=WriteValue($regkey,'Company',$companybin,'REG_BINARY')
>           $rc=WriteValue($regkey,'UserName',$fullnamebin,'REG_BINARY')
>           $rc=WriteValue($regkey,'UserInitials',$initials,'REG_BINARY')
>
>  ENDFUNCTION
>----------------------------------------------------------------------------------------------------------------------------------

>
>On 6/1/05, Michael Boggan <mboggan@xxxxxxxxxxx> wrote:
> > We are setting up a published desktop and the users need there outlook
> > setup.  We don't use roaming profiles etc.  They get a new profile
>everytime
> > they hit the box.  Using the .prf file we create there email account
>when
> > they login but it still asks for there Username and Initials when they
>run
> > outlook.  As you know, this would be fine if they kept there profile
but
> > since they don't, everytime they login and run Outlook, they get this.

>Is
> > there a way to turn it off or just have it except the default which is
>there
> > userid?
> >
> > Thanks,
> >
> >
> > Michael Boggan
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today - it's
>FREE!
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> > ********************************************************
> > This Weeks Sponsor: ThinPrint GmbH
> > Now available: The new version .print Engine 6.2 with SSL encryption
> > and certificate management.
> > http://www.thinprint.com
> > **********************************************************
> > Useful Thin Client Computing Links are available at:
> > http://thin.net/links.cfm
> > ThinWiki community - Excellent SBC Search Capabilities!
> > http://www.thinwiki.com
> > ***********************************************************
> > For Archives, to Unsubscribe, Subscribe or
> > set Digest or Vacation mode use the below link:
> > http://thin.net/citrixlist.cfm
> >
>********************************************************
>This Weeks Sponsor: ThinPrint GmbH
>Now available: The new version .print Engine 6.2 with SSL encryption
>and certificate management.
>http://www.thinprint.com
>**********************************************************
>Useful Thin Client Computing Links are available at:
>http://thin.net/links.cfm
>ThinWiki community - Excellent SBC Search Capabilities!
>http://www.thinwiki.com
>***********************************************************
>For Archives, to Unsubscribe, Subscribe or
>set Digest or Vacation mode use the below link:
>http://thin.net/citrixlist.cfm

_________________________________________________________________
Donât just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

********************************************************
This Weeks Sponsor: ThinPrint GmbH
Now available: The new version .print Engine 6.2 with SSL encryption
and certificate management.
http://www.thinprint.com
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
ThinWiki community - Excellent SBC Search Capabilities!
http://www.thinwiki.com
***********************************************************
For Archives, to Unsubscribe, Subscribe or
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm
N¬Yç*hžÊ+N§>¸§´i›Ú0jöåy8^ì/z»"¢zkŠ{Dž§{­°ŠØRH·§r¼©¶*'jw\z»b~'µé¨™éí†Ûiÿü0ÂØbžšâž×(™K~éS†)Â'§´*&¦ëbžâžK­æ¯j)ZnWš¶m§ÿí†)çzßåŠy,qù“†)ÖHœ¢i®ž+r–W§µ
 BIæ«rš¥¦â–+bzÈm¶ŸÿÃ-†)ðŠHœ¢ah¬
Ü+Þڞ˱Êâmä®nÇ+‰·¨®Ç(²Ú+U§¶*'š‡^ºÇ…æÞŒ%Šy!¶ÚþØbžw­ýÈ®,eŠË\~

Other related posts: