[THIN] Re: Office apps show my user having documents locked

  • From: "Rick Mack" <Rick.Mack@xxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Sat, 25 Mar 2006 08:51:11 +1000

Hi Evan,
 
Sorry, should have been a bit more explicit.
 
If a software installation is done in "install" mode and it updates any keys 
under HKCU\Software, the values will be copied to 
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Terminal 
Server\Install\Software (otherwise known as the shadow key). If an admin 
session is in "install" mode when the admin runs up an changes any app 
settings, these settings will also be copied to the shadow key.
 
When a user runs up an application, if the appropriate registry values aren't 
already there or they are older than the values in the shadow key, they'll get 
populated from the shadow key. In single server scenarios, this is can be a 
really usefull way to propagate application settings. However if the shadow key 
isn't identical on all your servers and has a different timestamp on each 
server, then things can get interesting.
 
Anyway, back to your issue. When you installed office, it would have 
"registered" the installer's name in HKCU and in the shadow key. After that the 
installers name (you) would have been populated to each users HKCU office 
settings the first time they ran office on the server.
 
You can "manage" the issue up front by deleting the shadow key entries, or just 
zeroing the username and userinitials entries under 
software\microsoft\office\xx.0\common\userinfo.(where xx= 9 10 or 11).
 
Once you're running in a production environment it's too late to fix things 
without resorting to either a script or a reg file to rewrite the values.
 
This is a very simple kix script that does the deed for office xp:
 
------
$regloc="HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\"
$regloc1="HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\UserInfo"
$Version="6"
 
; check to see if we've run already, increase version to change
if readvalue($regloc+"Common","Version")=$Version 
 goto end
endif
 
; add user info fields for office XP
; first determine length of string
$lenstr=len(@FULLNAME)
$unistring=""

; now convert the characters to unicode
while $offset<>$lenstr 
 $Offset=$offset+1
 $chr=dectohex(asc(substr(@fullname,$offset,1)))
 $unistring=$unistring +$chr+"00"
loop
$unistring=$unistring +"0000"
 
$result=writevalue($regloc1,"UserName",$unistring,"REG_BINARY")
$result=writevalue($regloc+"Common","Version","$Version","REG_DWORD")
:end
---------
 
Another way to handle this is to simply check to see what the values are. If 
they match your name, zero them or populate them with the users name.
 
Hope this helps.
 
regards,
 
Rick
 
Ulrich Mack 
Volante Systems 


________________________________

From: thin-bounce@xxxxxxxxxxxxx on behalf of Evan Mann
Sent: Sat 25/03/2006 8:16
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: Office apps show my user having documents locked


How would I have "managed" this information up front before other users started 
logging in?  Why is this happening if it's a HKCU key and not an HKLM key?  Why 
did my info end up in everyone elses HKCU?  That would imply my info ended up 
in the Default User NTUSER.DAT, right?  Is that something that happens on a 
terminal server when you install an app?  Because that doens't happen on 
regular computers.  I recall having this problem on 2000 TS servers, but maybe 
I just never got calls from usrs with locked file.
 

________________________________

From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of 
Rick Mack
Sent: Friday, March 24, 2006 5:02 PM
To: thin@xxxxxxxxxxxxx
Subject: RE: [THIN] Office apps show my user having documents locked


Hi Evan,
 
Office uses the user info under 
HKCU\software\microsoft\office\xx.0\common\userinfo to identify a user. If you 
installed office as yourself and never managed this information, then you "own" 
all the copies of word etc running.
 
A bit of scripting will fix the problem ;-)
 
regards,
 
Rick
 
Ulrich Mack 
Volante Systems 


________________________________

From: thin-bounce@xxxxxxxxxxxxx on behalf of Evan Mann
Sent: Sat 25/03/2006 4:59
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Office apps show my user having documents locked



Every time someone on Citrix opens a document and gets a file locked error, it 
always shows my name.  I was logged in when I installed office (in install 
mode), and I'm also a user of the Citrix servers, but why does it always show 
me having the file locked, and not the real person with the file locked?


#####################################################################################

This e-mail, including all attachments, may be confidential or privileged. 
Confidentiality or privilege is not waived or lost because this e-mail has been 
sent to you in error. If you are not the intended recipient any use, disclosure 
or copying of this e-mail is prohibited. If you have received it in error 
please notify the sender immediately by reply e-mail and destroy all copies of 
this e-mail and any attachments. All liability for direct and indirect loss 
arising from this e-mail and any attachments is hereby disclaimed to the extent 
permitted by law.

#####################################################################################


#####################################################################################
This e-mail, including all attachments, may be confidential or privileged.  
Confidentiality or privilege is not waived or lost because this e-mail has been 
sent to you in error.  If you are not the intended recipient any use, 
disclosure or copying of this e-mail is prohibited.  If you have received it in 
error please notify the sender immediately by reply e-mail and destroy all 
copies of this e-mail and any attachments.  All liability for direct and 
indirect loss arising from this e-mail and any attachments is hereby disclaimed 
to the extent permitted by law.
#####################################################################################

Other related posts: