@simbears: "I have installed and configured Office 2000 using a MST file on Citrix.
All working fine, except when users use Excel and add a comment it' appears
with my name, does any one which registry this is stored in to make the
necessary change.
Regards"
    @mail: "For 2003 it's probably;
HKCU\Software\Microsoft\Office\11.0\Common\UserInfo
Can't verify this but look in;
HKCU\Software\Microsoft\Office\9.0\Common\UserInfo
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
<url>
|I have installed and configured Office 2000 using a MST file on Citrix.
|
| All working fine, except when users use Excel and add a comment it' 
appears
| with my name, does any one which registry this is stored in to make the
| necessary change.
|
| Regards
|
| "
    @simbears: "The information contained in the registry is in binary, would I have to
convert this and enter the correct username?
Thanks
news:<email_address>
<quote>"
    @TorgeirBakkenspam: "<quote>
Hi
With a VBScript:
'8<
Const HKCU = &H80000001
sComputer = "."
' Office username to be written to registry
sUsername = "torgeir"
aUsername = ToByteArray(sUsername)
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
             & sComputer & "\root\default:StdRegProv")
sKeyPath = "SOFTWARE\MICROSOFT\OFFICE\9.0\COMMON\USERINFO\"
sValueName = "UserName"
iRC = oReg.SetBinaryValue(HKCU, sKeyPath, sValueName, aUsername)
If iRC <> 0 Then
     'An error occurred
     WScript.Echo "Error, return code: " & iRC
     WScript.Quit
End If
Function ToByteArray(ByVal sString)
   ReDim aBytes(Len(sString) * 2 + 1)
   iIndex = -1
   For iPos = 1 To Len(sString)
     iIndex = iIndex + 1
     aBytes(iIndex) = Asc(Mid(sString, iPos, 1))
     ' add a 0 after each letter
     iIndex = iIndex + 1
     aBytes(iIndex) = 0
   Next
   ' add two closing 0's
   iIndex = iIndex + 1
   aBytes(iIndex) = 0
   iIndex = iIndex + 1
   aBytes(iIndex) = 0
   ToByteArray = aBytes
End Function
'8<
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
<url>"
    @mail: "Well.............. there you have it.
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
<url>
|
| > The information contained in the registry is in binary, would I have to
| > convert this and enter the correct username?
| Hi
|
| With a VBScript:
|
| '8<
| Const HKCU = &H80000001
|
| sComputer = "."
|
| ' Office username to be written to registry
| sUsername = "torgeir"
|
| aUsername = ToByteArray(sUsername)
|
| Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
|             & sComputer & "\root\default:StdRegProv")
|
| sKeyPath = "SOFTWARE\MICROSOFT\OFFICE\9.0\COMMON\USERINFO\"
| sValueName = "UserName"
|
| iRC = oReg.SetBinaryValue(HKCU, sKeyPath, sValueName, aUsername)
|
| If iRC <> 0 Then
|     'An error occurred
|     WScript.Echo "Error, return code: " & iRC
|     WScript.Quit
| End If
|
|
| Function ToByteArray(ByVal sString)
|
|   ReDim aBytes(Len(sString) * 2 + 1)
|
|   iIndex = -1
|   For iPos = 1 To Len(sString)
|     iIndex = iIndex + 1
|     aBytes(iIndex) = Asc(Mid(sString, iPos, 1))
|     ' add a 0 after each letter
|     iIndex = iIndex + 1
|     aBytes(iIndex) = 0
|   Next
|
|   ' add two closing 0's
|   iIndex = iIndex + 1
|   aBytes(iIndex) = 0
|   iIndex = iIndex + 1
|   aBytes(iIndex) = 0
|
|   ToByteArray = aBytes
| End Function
| '8<
|
|
|  
| torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
| Administration scripting examples and an ONLINE version of
| the 1328 page Scripting Guide:
| <url> "
{'source': 'USENET', 'other_information': '{"reply_count": 4, "forum_name": "microsoft.public.win2000.registry.20140626.mbox"}', 'file': 'data/output/usenet-microsoft.public.parquet'}