You are in luck. I have done this just recently. Unfortunately ADSI does not do TSE stuff, but here is something that does..

Firstly, read this post and greetz to all involved getting that working

Secondly, here is the code that I am currently using to set the terminal server profile path

VBScript

code:

function TSProfilePath(sUserID, sProfilePath) '......................................................Set TSE Profile
on error resume next ' continue on errors
set oTSConfig=CreateObject("UserConfig.TSUserConfig") ' create a Terminal Server settings object
oTSConfig.UserName=sUserID ' select user ID
oTSConfig.Domain=sNTDomain ' select NT Domain
zTemp=oTSConfig.SetUserConfig(15, sProfilePath) ' set profile path for user
TSProfilePath=err.number & "," & err.description ' return with the status
end function

KiXtart 4.02

code:

function TSProfilePath($sUserID, $sProfilePath) '......................................................Set TSE Profile
$oTSConfig=CreateObject("UserConfig.TSUserConfig") ' create a Terminal Server settings object
$oTSConfig.UserName=$sUserID ' select user ID
$oTSConfig.Domain=$sNTDomain ' select NT Domain
$zTemp=$oTSConfig.SetUserConfig(15, $sProfilePath) ' set profile path for user
$TSProfilePath=@error & "," & @serror ' return with the status
endfunction


and thirdly, here is where you can download the .DLL you need to make all this work. As usual, use REGSVR32 to register.

cj

p.s. I have not tested the KiX code, I just converted it from my VBScript code.