Search This Blog

Wednesday, December 28, 2011

R8.5 Upgrade Project Technical Puzzle

So I'm working on an R6.5 to R8.5 Lotus Notes project the servers are done, for the most part. But now we are having trouble getting final buy-in for upgrading the clients. I have 20,000 of them to do when we get around to doing them, so the pilot has to be OK'ed by the group. I Currently, have 400 pilot clients running some version of R8.5. Some are using the 8.5 Mail template and some are not. And my Project Manager wants to know the following:


How many named PCs in the collection of Pilot are running the latest version of the package?
Who is running Notes R8.5 on that PC, so that we can convert their mailbox to R8?

So, here is what I did...

I made a list of PCs listed in the pilot collection (from SCCM) and put it in a file called workstations.txt

us000001
us000001
mx000001
mx000002
cn000001
cn000002

And, wrote the following code...
===============================================================================
'txtFile = "workstations.txt"
txtFile = "workstationsTest.txt"
const HKEY_LOCAL_MACHINE = &H80000002


'   Lotus Notes 6.5.1 Single Client  {1AAE3976-3167-4BDF-B785-00E19C6671A3}
'   Lotus Notes 6.5.4 Single Client  {6B2764B1-F062-4481-94FD-58B1C211C448}
'   Lotus Notes 8.5.1 Single Client  {6ACD1549-274A-491B-A233-2B8B689DD0D3}
'   Lotus Notes 8.5.1 Multi Client   {836670E9-61EB-4D47-9EF8-CFE936C3FE32}
'   Lotus Notes 8.5.2 Single Client  {E11DFB27-BAF4-46D6-AD76-D5519C0E6786}
'   Lotus Notes 8.5.2 Multi Client   {07C69B3A-62B3-41BF-82EE-B3A87BD6EA0C}
'   Lotus Notes 8.5.3 Single Client  {95246D82-99D2-4229-841E-6867C3251087}


 dim reg(7)
 reg(1)="{07C69B3A-62B3-41BF-82EE-B3A87BD6EA0C}" '   Lotus Notes 8.5.2 Multi Client
 reg(2)="{836670E9-61EB-4D47-9EF8-CFE936C3FE32}" '   Lotus Notes 8.5.1 Multi Client
 reg(3)="{6ACD1549-274A-491B-A233-2B8B689DD0D3}" '   Lotus Notes 8.5.1 Single Client
 reg(4)="{6B2764B1-F062-4481-94FD-58B1C211C448}" '   Lotus Notes 6.5.4 Single Client
 reg(5)="{1AAE3976-3167-4BDF-B785-00E19C6671A3}" '   Lotus Notes 6.5.1 Single Client
 reg(6)="{E11DFB27-BAF4-46D6-AD76-D5519C0E6786}" '   Lotus Notes 8.5.2 Single Client
 reg(7)="{95246D82-99D2-4229-841E-6867C3251087}" '   Lotus Notes 8.5.3 Single Client
 
 
dim txtNotesVersion, txtLastUser, txtPersonName, txtMailServer, txtMailFile
dim txtUserName, count
 
on error resume next 'many PCs will not respond

Dim session, db, view, doc

Set session = CreateObject("Lotus.NotesSession")
Call session.Initialize("xxxxxxxxxxxx")
'wscript.echo "Username: " & session.CommonUserName & "..."
set db = session.getDatabase("HRSM0001/SRV/NA/MyCompanyHub", "names.nsf")
set view =db.getView("lookup\shortname")


Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(txtFile, 1)
Do Until objFile.AtEndOfStream
   count = count + 1
   strComputer = objFile.ReadLine
   txtNotesVersion = ReadRegistry(strComputer)
   if len(txtNotesVersion) > 0 then
      txtLastUser = LastUser(strComputer)
      set doc = view.getDocumentByKey(txtLastUser)
      txtPersonName = doc.getItemValue("FullName")
      txtMailServer = doc.getItemValue("MailServer")
      txtMailFile  = doc.getItemValue("MailFile")
   end if
   wscript.echo cstr(count) & ":" & strComputer & ":" & txtNotesVersion & ":" & txtLastUser & ":" & Abbreviate(txtPersonName(0)) & ":" & Abbreviate(txtMailServer(0)) & ":" & txtMailFile(0)
'   wscript.echo cstr(count) & vbTab & strComputer & vbTab & txtNotesVersion & vbTab & txtLastUser & vbTab & Abbreviate(txtPersonName(0)) & vbTab & Abbreviate(txtMailServer(0)) & vbTab & txtMailFile(0)
Loop
objFile.Close
WScript.Quit

 
Function ReadRegistry (strComputer)

   Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
   strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
   strValueName = "DisplayName"
   for i = 1 to 6
      oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath+reg(i),strValueName,strValue
      if len(strValue)>0 then exit for
   next
   ReadRegistry = strValue
end function

function LastUser (strComputer)
   Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
   
   strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon"
   strValueName = "DefaultUserName"
   
   objRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue
   
   LastUser = strValue

end function

function Abbreviate (txtIn)

   txtIn = replace (txtIn, "CN=", "")
   txtIn = replace (txtIn, "OU=", "")
   txtIn = replace (txtIn, "O=", "")
   
   Abbreviate = txtIn
   
end function

===============================================================================

* You may notice about line 43 (wscript.echo cstr(.... ), uses colons as the delimiter. The next line uses tabs, which I used for importing the data into a spreadsheet.

Which produces the following output...
1:us000001:Lotus Notes 6.5.4:MS000001:Mary Smith/RSM/NA/MyCompany:SRSMM001/SRV/NA/MyCompany:mail\MS000001
2:us000002:Lotus Notes 6.5.4:JJ000002:James Johnson/AMA/NA/MyCompany:SMMOM023/SRV/NA/MyCompany:mail\JJ000002
3:mx000001::MH000001:María Hernández/OAX/NA/MyCompany:SMOXA001/SRV/NA/MyCompany:mail\MH000001
4:mx000002:Lotus Notes 8.5.1:SC000001:Santiago García/OAX/NA/MyCompany:SMOXA001/SRV/NA/MyCompany:mail\SC000001
5:cn000001:Lotus Notes 8.5.2:EL000001:Emma Li/PEI/NA/MyCompany:SMPEI001/SRV/NA/MyCompany:mail\ELi
6:cn000002:Lotus Notes 8.5.1:JL000001:Jacob Lam/PEI/NA/MyCompany:SMPEI001/SRV/NA/MyCompany:mail\JL000001

* Line 3: Turns out Maria's PC does not have Notes installed on it.

Which I pipped to a .txt file for later manipulation and merging with other data sources.


Thursday, August 25, 2011

Lotus Notes Revision Numbers

In my current R8.5 Notes client upgrade the pilot clients have a veriety of builds. To help keep track of it all, Here is a partial list of Lotus Notes revision numbers.

20090615.0130 (Release 8.5.1)
20090920.1010 (Release 8.5.1)
20090929.1223 (Release 8.5.1)
20091002.1006 (Release 8.5.1 FP1)
20101103.0200-FP1 (Release 8.5.2FP1)
20100524.0930-FP3 (Release 8.5.2FP3)
20100726.1445_FP4 (Release 8.5.2FP4)
20100811.1131 (Release 8.5.2)
20101103.0200-FP1 (Release 8.5.2FP1)
20110711.1400-FP3 (Release 8.5.2FP3)

Saturday, June 25, 2011

a LARP Story

At the Origins Game Fair 2011 in Columbus, Ohio The Origins Dungeon 2011 was being hosted by NERO Chicago and run by Steve Cecchin.

So this was my first attempt at a Live Action Role Playing game. On Saturday, to get a feel for it, I partially watched an earlier group start their run and, after some strong goading by my spouse Barb, thought "What the heck? I'll give it a go!" I signed up for the next round at 2 pm.

This was a larger group than I watched earlier. While the earlier group had 6 players, This group had 13. After some quick organizing, we ended up with 7 fighters, 3 Clerics (healers), and 3 Wizard. I was a Wizard.

The basic plot to this story was that the evil necromancer Xerxis has kidnapped a princess and we were to rescue her. The GM (Game Master. He is the referee) followed to "assist" if we all got in to "to much trouble".

So, with lots of undead encounters we made it through the entrance of the mine/cave to the rune-riddled-triggered-secret-door-boss-encounter entrance. One of the riddles referred to a wise person standing at one of the rune stones. Apparently, my gray hair made me the wisest person there. Which seemed to settle the GM ruling and the door was eventually opened. After which, we had some fierce fighting to the Boss chamber.

In the Boss chamber was Xerxis, his main minion (quite a fierce looking skeleton with a very big sword), and all the other minions, re-spawned for our slaying pleasure. Oh, and the Princess was, looking quite kidnapped, tied up in a corner. Xerxis froze our 2 lead fighters at the entrance leaving the rest of us trapped behind them in the hall. The ruling was that the players were frozen while within sight of Xerxis. Xerxis then started to monologue. He started by pleading for the case against our invading his home and destroying all that he had built there. Then after getting the leading players to stop and chat, he started to negotiate a ransom from the players. Some gold coin, and some of their weapons.

Suddenly, a stone was thrown hitting Xerxis. Someone shouted "One point normal!". Everyone stopped, stunned, and Xerxis shouted out "Who did that?!?". He sounded very angry. A wizard's hand shot up from the back of the players and, after a path was quickly cleared, I answered "I did!" One of the players commented "I thought you were wise!". It was at this point, Barb, who had been following along, watching and taking pictures started to laugh her behind off. Continuing... "I was wondering if you could show me the way to the rest room? I didn't have a chance to stop before we came in, and I really have to go." Still shock and stunned silence. the GM leaned over and and asked "Do you really have to go?". Out of the corner of my mouth I said "It's called 'guile' man!" To which, he leaned away, rolled his eyes and said "I don't think he would have gone for it."

Finally, the fighters freeze spell wore away, and we were in the final battle. After overcoming the Xerxis' main minion, the battled went back in to the tunnels. Most of the fighters went off to chase Xerxis leaving a few of us left in the Boss room. Oh, and the princess was there, unconscious and tied up in the corner. Recognizing this I found a cleric and we healed her, untied her, and got her a weapon. She apparently likes her sword, but grudgingly took an axe that we had.

As the Princess started down the tunnels toward the entrance, the cleric and I were attacked from the rear by a re-spawning skeleton. The cleric cast a disarm spell. Upon the skeleton dropping the sword, the Cleric grabbed it, and I charged. The Skeleton stood there dejected and said "This is going to suck...", as I reduced him to a pile of bones with my dagger. "One point normal!" (a few times), and the cleric got in a blow too.

In one attack from the rear I was incapacitated. A skeleton attacked me twice "Ten points normal!" each. I though I was dead. One of the players came up to heal me. I told him I though I was dead. I told him, while holding up a little white card, that the GM had previously given me a ring of resurrection to be used on some player, "not yourself." The Princess, standing there, made a motion with her hand, stright fingers to thumb in a sign to shut-up, and told me "You're dead!" I think she was just testy from the whole kidnapping, tied-up, unconscious thing? So I lay there. The GM Ruled that I don't know how to count health points and armor vs. damage and ruled that I was alive and that the healing worked. Hooray, I survived!

But somewhere in the mix Xerxis tricked us and was able to casually stroll out and excaped!

Naughty evil necromancer!



http://www.originsgamefair.com/
http://www.nerochicago.com