OK,

Now I changed the RMTEXEC with fnRemoteExec and provided domain user and password.

Code:


$rc = fnRemoteExec('C:\Winnt\Temp\dir.bat', $computer, $User , $Passwd)




Function fnRemoteExec($sCommand,Optional $sComputer,Optional $sUser,Optional $sPwd)
Dim $objLocator,$objSvc,$objSet
$objLocator = CreateObject("WbemScripting.SwbemLocator")
$objSvc = IIf($sComputer='',$objLocator.ConnectServer(),$objLocator.ConnectServer($sComputer,,$sUser,$sPwd))
If @ERROR Exit @ERROR EndIf
$objSet = $objSvc.Get("Win32_Process")
If @ERROR Exit @ERROR EndIf
$fnRemoteExec = $objSet.Create($sCommand)
Exit @ERROR
EndFunction





Should this work? Cause it don’t!
Same behavior, no action nothing happens.

If I want it to pop up, what should I do then?