Ok here it is.
And this needs 4.21 rc1 to work, have just tested it with 4.20 and no success
code:
$sDatabaseSource="\\FS1\Profiles$$\groups\sintas\data\"
$sDatabaseDestination="\\fs1\randers-reb$$\userdata\"+@USERID+"\addon\"
If Not Exist($sDatabaseDestination)
Copy $sDatabaseSource $sDatabaseDestination /s
ENDIF
$sintasreg = "HKCU\Software\Add-On Products\exchange central\paths"
IF KEYEXIST ($sintasreg) = 0
ADDKEY ($sintasreg)
ENDIF
IF (WriteValue($sintasreg,"DefaultDatabase","\\fs1\randers-reb$\userdata\"+@USERID+"\addon\","REG_SZ") <> 0 )
? "Warning KIX: Error status @error (@serror)"
ENDIF
IF (WriteValue($sintasreg,"UserData","\\fs1\randers-reb$\userdata\"+@USERID+"\addon\","REG_SZ") <> 0 )
? "Warning KIX: Error status @error (@serror)"
ENDIF
_________________________
One by one the Pinguins came and took my sanity away.