Roaming with Lotus Notes using ZfD 3
Novell Cool Solutions: Trench
By John McILwaine
|
Digg This -
Slashdot This
Posted: 5 Sep 2001 |
Current Version: ZENworks for Desktops 3.2
Through a series of batch files and VB scripts, Notes users are able to roam and keep their passwords and bookmarks current. (All the while running Notes local, as supported by IBM, on either Win95 or W2K.) Their ID files are not left behind to be hacked and if a Notes session abends while roaming that is taken care of as well.
Three objects are required. Home, Prep and Use.
HOME OBJECT
This is the icon that everybody in the company uses. It is an Install Run with a Run Before Launching entry and a Run After Termination.
It is important to use NLNOTES.EXE in the Path to Executable. (Wrapper!)
Run Before Launching
#<Path>\Home.bat
@echo Off
if exist c:\notes\data\save\names.nsf goto clean
xcopy p:\notes5\*.id c:\notes\data /d /y /u
xcopy p:\notes5\notes.ini c:\notes /d /y
xcopy p:\notes5\names.nsf c:\notes\data /d /y
xcopy p:\notes5\bookmark.nsf c:\notes\data /d /y
goto exit
:Clean
del c:\notes\data\*.id
move /y c:\notes\data\save\desktop5.dsk c:\notes\data
move /y c:\notes\data\save\names.nsf c:\notes\data
move /y c:\notes\data\save\bookmark.nsf c:\notes\data
move /y c:\notes\data\save\*.id c:\notes\data
move /y c:\notes\data\save\notes.ini c:\notes
rd c:\notes\data\save
xcopy p:\notes5\*.id c:\notes\data /d /y /u
xcopy p:\notes5\notes.ini c:\notes /d /y
xcopy p:\notes5\names.nsf c:\notes\data /d /yB
xcopy p:\notes5\bookmark.nsf c:\notes\data /d /y
:exit
Run After Termination
#Wscript.exe <Path>\Homeexit.vbs
Call RunProgram("xcopy c:\notes\data\*.id p:\notes5 /d /y /u", TRUE)
Call RunProgram("xcopy c:\notes\notes.ini p:\notes5 /d /y", TRUE)
Sub RunProgram(Filename ,Wait)
Set WshShell = Wscript.CreateObject("Wscript.Shell")
RetVal = WshShell.Run (Filename ,wait)
End Sub
PREP OBJECT
A person who is going to roam would run this before leaving for the day. (It is only NEEDED to be 100% current, otherwise older version is used.)
Run Before Launching
#Wscript.exe <Path>\preroam.vbs
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Popup "You Are Set To Roam...!",,"Sun Life Financial - Preparing for Roaming Notes",64
Call RunProgram("xcopy c:\notes\data\bookmark.nsf p:\notes5 /y",True)
Call RunProgram("xcopy c:\notes\data\names.nsf p:\notes5 /y",True)
Call RunProgram("xcopy c:\notes\notes.ini p:\notes5 /y",True)
Call RunProgram("xcopy c:\notes\data\*.id p:\notes5 /y",True)
Sub RunProgram(Filename ,Wait)
Set WshShell = Wscript.CreateObject("Wscript.Shell")
RetVal = WshShell.Run (Filename ,wait)
End Sub
ROAMING OBJECT
A person would use this object when they are actually roaming.
NLNOTES.EXE in the path to executable.
Run Before Launching
#Wscript.exe <path>\Strtroam.vbs
L_Welcome_MsgBox_Message_Text = "You Are Not At Your Usual Workstation. Click Ok To Continue."
L_Welcome_MsgBox_Title_Text = "Sun Life Financial - Roaming Notes"
Call Welcome()
' *****************************************
' *
' * Welcome
' *
Sub Welcome()
Dim intDoIt
intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
vbOKCancel + vbQuestion, _
L_Welcome_MsgBox_Title_Text )
If intDoIt = vbCancel Then
Msgbox "Notes will load and run normally...", vbInformation, "Sun Life Financial - Roaming Notes"
WScript.Quit
End If
End Sub
dim fso,newfolder
set fso = CreateObject("Scripting.FileSystemObject")
fso.CreateFolder ("c:\notes\data\save")
fso.CopyFile "c:\notes\data\*.id","c:\notes\data\save\",True
fso.CopyFile "c:\notes\data\names.nsf","c:\notes\data\save\",True
fso.CopyFile "c:\notes\data\bookmark.nsf","c:\notes\data\save\",True
fso.CopyFile "c:\notes\data\desktop5.dsk","c:\notes\data\save\",True
fso.CopyFile "c:\notes\notes.ini","c:\notes\data\save\",True
fso.DeleteFile "c:\notes\data\desktop5.dsk",True
fso.DeleteFile "c:\notes\data\*.id",True
fso.CopyFile "p:\notes5\*.id","c:\notes\data\",True
fso.CopyFile "p:\notes5\names.nsf","c:\notes\data\",True
fso.CopyFile "p:\notes5\bookmark.nsf","c:\notes\data\",True
fso.CopyFile "p:\notes5\notes.ini","c:\notes\",True
Sub RunProgram(Filename ,Wait)
Set WshShell = Wscript.CreateObject("Wscript.Shell")
RetVal = WshShell.Run (Filename ,wait)
End Sub
Run After Termination
#<path>\Exitroam.bat
@echo off
if not exist c:\notes\data\save\names.nsf goto finish
xcopy c:\notes\data\*.id p:\notes5 /d /y /u
xcopy c:\notes\notes.ini p:\notes5 /d /y
xcopy c:\notes\data\bookmark.nsf p:\notes5 /d /y
xcopy c:\notes\data\names.nsf p:\notes5 /d /y
del c:\notes\data\*.id
move /y c:\notes\data\save\desktop5.dsk c:\notes\data
move /y c:\notes\data\save\names.nsf c:\notes\data
move /y c:\notes\data\save\bookmark.nsf c:\notes\data
move /y c:\notes\data\save\*.id c:\notes\data
move /y c:\notes\data\save\notes.ini c:\notes
rd c:\notes\data\save
Goto Exit
:Finish
xcopy c:\notes\data\*.id p:\notes5 /d /y /u
xcopy c:\notes\notes.ini p:\notes5 /d /y
:Exit
Notes
If you are wondering why I used batch files it is because I have VERY LITTLE skill at writing VB scripts. Any experts out there?
Of course PIF files are used so the user doesn't see the DOS box.
The Home object includes Reg entries to enable the Mailto: feature to work, Notes.ini entries for company specific customisations and delivery of our own Bookmark.nsf
If you have any questions you may contact John at jmcil@sunlife.com
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

