When you need to do other stuff in the script you can restart the script in admin credentials (Larry posted this idea a while ago):

$Username = "administrator"
$Password = "xyz"
$Run = 0
; retrieve the STEP from commandline
If $CmdLine[0] = 1 then $run = $CmdLine[1]
;
If $run = 0 then
If Not isadmin() Then
RunAsSet ($Username, @Computername, $Password)
; start the script program (itself) again but now in Adminmode...so all tasks will run in Adminmode
Run('"' & @ScriptFullPath & '" " 1"' )
If @error = 1 Then
msgbox(48,"Error","cannot start the installation because we are unable to change to adminmode.")
EndIf
Exit
EndIf
EndIf
: stuff you want to do in admin mode
;