I have the rcmd uninstall section working now.

code:
 Function Uninstall
$tools="\\a06\logon\tools"
$command=$uninstallkey[$txtApp.ListIndex]

$command = $Form.InputBox("Verify Uninstall Command","Uninstall Command",$command)
if not $command = ''
$tempcmd=''
for $loop=1 to len($command)
$char=substr($command,$loop,1)
if $char='"'
$tempcmd=$tempcmd + '"' + '"'
endif
$tempcmd=$tempcmd + $char
next
$command = $tempcmd
use "\\$name\ipc$$"
$targetSystemRoot = readvalue("\\$name\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\","SystemRoot")
shell '%comspec% /c $tools\xnet list $target | find /i "rcmdsvc" > nul'
if @error = 0
shell '%comspec% /c $tools\xnet stop \\$name\rcmdsvc > nul'
shell '%comspec% /c $tools\xnet remove \\$name\rcmdsvc /y > nul'
endif
copy "$tools\rcmd*.exe" "\\$name\admin$$\system32"
if @error <> 0 exit(@error) endif
shell '%comspec% /c $tools\xnet install \\$name\rcmdsvc /b:$targetsystemroot\system32\rcmdsvc.exe /n:"Remote Command Service" /u:localsystem /i:y /s:auto > nul'
shell '%comspec% /c $tools\xnet start \\$name\rcmdsvc > nul'
shell '%comspec% /c $tools\rcmd.exe \\$name "$command"'
shell '%comspec% /c $tools\xnet stop \\$name\rcmdsvc > nul'
shell '%comspec% /c $tools\xnet remove \\$name\rcmdsvc /y > nul'
del "$destdir\rcmdsvc.exe"
use "$target\ipc$$" /delete
endif
endfunction

_________________________
How to ask questions the smart way <-----------> Before you ask