Ed_Patterson
(Fresh Scripter)
2006-06-30 12:52 AM
is it possible to copy to redirected my documents

Subject says it all, I am new to AD and can't seem to come up with the magic combination. Basically I need to copy users notes user.id file to their redirected my documents folder.

Any help appreciated.

Ed


NTDOCAdministrator
(KiX Master)
2006-06-30 12:54 AM
Re: is it possible to copy to redirected my documents

Just use KiXtart to read the registry where their My Documents is really located and you should be able to do the copy no problem.

Let us know if you need further assistance with this task.


Les
(KiX Master)
2006-06-30 01:04 AM
Re: is it possible to copy to redirected my documents

Well.. the first task is to FIND their UserID file. Never hard code it because users can switch ID.
:First check "App Paths" to see if Notes is installed
$IsNotesInstalled=ReadValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notes.exe','Path')

The script then locates the notes.ini file from the following reg Key/Value:
HKCU\Software\Lotus\Notes\6.0
NotesIniPath
e.g. "C:\Documents and Settings\LLigetfa\Local Settings\Application Data\Lotus\Notes\Data\notes.ini"

That method only works on regular client installs. Administrator installs lack the \6.0 reg key.

The script then reads the INI file For the following Keys/Values:
[Notes]
Directory=
e.g. "C:\Documents and Settings\LLigetfa\Local Settings\Application Data\Lotus\Notes\Data"

KeyFilename=
e.g. "lligetfa.id"


$NotesIniPath=ReadValue('HKCU\Software\Lotus\Notes\6.0','NotesIniPath')
$Directory=ReadProfileString($NotesIniPath,'Notes','Directory')

You then need to determine if the ID file is in the current dir or another dir.
$KeyFilename=ReadProfileString($NotesIniPath,'Notes','KeyFilename')
If InStr($KeyFilename,'\')
$FileNames[0]=$KeyFilename
Else
$FileNames[0]=$Directory+'\'+$KeyFilename
EndIf

That's a start anyway.


Ed_Patterson
(Fresh Scripter)
2006-06-30 01:41 PM
Re: is it possible to copy to redirected my documents

Les, thanks for the detailed reply. It shed the light on some possibilities I did not know existed.

Ed