Well, you might get stuck in an endless loop if your user doesn't have sufficient rights to register DLLs (e.g. at least Power User rights) so I might prefer doing it like this...

code:
$frmRoot = CreateObject("Kixtart.Form")
If @ERROR
$nul=SetConsole("Show")
"KiXforms.dll not installed/registered" ?
Copy @SCRIPTDIR+"\KiXforms.dll" "%WINDIR%"
If @INWIN = "1"
Shell "%COMSPEC% /c Regsvr32 /s %WINDIR%\KiXforms.dll"
Else
Shell "%COMSPEC% /c %WINDIR%\System\Regsvr32 /s %WINDIR%\KiXforms.dll"
EndIf
$frmRoot = CreateObject("Kixtart.Form")
If @ERROR
"Unable to register KiXforms.dll, please call the helpdesk." ??
"Press ENTER to continue..." ?
Get $S
Exit(1)
EndIf
EndIf

The @INWIN section is in there since RegSvr32 is in not necessarily in the %PATH% on Win 9x machines.