Hi there,

can anyone please tell me what is wrong here:

code:

$ProfilesDir=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","ProfilesDirectory")
$DUProfFile=$ProfilesDir + "\Default User\SendTo\Notepad.lnk"
IF EXIST ( "$DUProfFile" )
"+"
ELSE
"c"
copy "$DataSource\NotePadLinks\NTNotPad.lnk" "$DUProfFile"
ENDIF


In NT4
1. line: Reading Profiles Path from Registry (it returns: "%SYSTEMROOT%\Profiles")
2. line: Add specific filename
3. check if file exists
if so write a "+" if not copy

My Problem is that EXIST ("$DUProfFile") says file not exist although the value of the var is "%SYSTEMROOT%\Profiles\Default User\SendTo\Notepad.lnk" and the specified files is existing. And it does not copy that one as well.

Same thing on
$ProfilesDir + "\Administrator\SendTo\Notepad.lnk"

Thanks for help

Fabian