ich wüsst' gern, ob eine if-Abfrage auf FileExists mit UNC-Pfaden umgehen kann. Hintergrund: Ich möchte in einem userLoginScript Dateien von einem Netzlaufwerk ins AppData-Verzeichnis des Users kopieren. Klingt eigentlich nach keiner großen Aktion, aber klappen tut's nicht: Das Protokoll meldet immer wieder "FileExists("\\{FQDN des FileClusters}\users\{username}\Lotus\Notes\Data\bookmark.nsf") <<< result false"
Hier mein Code dazu:
Code: Alles auswählen
[Actions]
defVar $LogDir$
defVar $ProductID$
defVar $MinimumSpace$
defVar $InstallDir$
defVar $ExitCode$
defVar $sUserName$
defVar $sAppData$
defVar $sSetupTxtPath$
defVar $sNotesIniPath$
defVar $sClusterPath$
set $LogDir$ = "%opsiLogDir%"
set $sUserName$ = getLoggedInUser
set $sClusterPath$ = "\\{FQDN des FileClusters}\users\" + $sUserName$
set $sAppData$ = "c:\users\" + $sUserName$ + "\appdata\local\IBM\Notes\Data"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
;$ProductID$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
set $ProductID$ = "notes9"
set $MinimumSpace$ = "2 GB"
set $InstallDir$ = "%ProgramFiles32Dir%"
; the path were we find the product after the installation
; ----------------------------------------------------------------
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductID$ + ".png" "Konfiguriere Notes 9"
Message "Configuring " + $ProductID$ + " ..."
Files_CopyConfigFiles
if FileExists($sClusterPath$ + "\bookmark.nsf")
Files_CopyUserFiles
endif
; ****************************************************** secondary sections ******************************************************
[Files_CopyConfigFiles]
checkTargetPath = "$sAppData$"
copy -n "%ScriptPath%\configfiles\*.*" "$sAppData$"
[Files_CopyUserFiles]
copy -n "$sClusterPath$\Lotus\Notes\Data\bookmark.nsf" "$sAppData$"
copy -n "$sClusterPath$\Lotus\Notes\Data\desktop8.ndk" "$sAppData$"
Sebastian