i change the code so that he use SU.exe. (yeah, really something wrong with code today, its friday )

$Devpath="c:\winnt\system32\Su.exe"
$SuUsername="userid"
$SuPassword="password"
RunSuAs("$Devpath c:\winnt\system32\regedit.exe /s c:\1.reg")
? @SERROR

Sleep 10
;=======================================================================================================================
Function RunSuAs($CommandLine)
If Exist($Devpath)
SetL "SU_DOMAIN=FRITZEU"
SetL "SU_PASSWORD=$SuPassword"
SetL "SU_USERNAME=$SuUsername"
SetL "SU_COMMANDLINE=$CommandLine"
EndIf
EndFunction

regards,

Expodium