Re: Remove programs with a script?




"Michael Harris (MVP)" <mikhar.at.mvps.dot.org> wrote in message
news:eI6xEGnnHHA.1244@xxxxxxxxxxxxxxxxxxxxxxx
Alternately, you could create another batch script that would run
"uninst_notes.bat" on the other workstations using PSexec from the
PSTools "SysInternals" package (see
http://www.microsoft.com/technet/sysinternals/default.mspx). Whether
or not this will work for you will depend to some extent on the
content of the "uninst_notes.bat" file.

Good suggestion -- but it too has the same administrator access and remote
impersonated account constraints.

Fortunately for us all you cannot generally run things remotely without
actually being an admin ;-)
As for the remote impersonation thing, you're right. But some might find
PSexec's way of managing this less non-intuitive.

And it also would require the *.bat/cmd file to be copied to the remote
machine and explicitly referenced via a local path (relative to process
executed) on the remote machine.

The /c switch causes PSexec to copy the file to the target system for you,
run it, and then delete it, so you can avoid some of the details. I
typically run a small batch file that way that calls a batch script back on
the server.

I made the suggestion, because it seemed to me that the OP was getting a
little bit hung up in vbscript issues, which seems an unfortunate problem
for someone who just wants to run a batch script.


/Al


--
Michael Harris
Microsoft.MVP.Scripting




.



Relevant Pages

  • Re: remote machine execution
    ... i tried and it only pass the exe over the remote machine without the ... What happens when you execute the command line locally on machine nol-b0000586? ... you use any credentials to run the command via psexec, ... I suspect that the process spawned by psexec on the remote PC needs some network ...
    (microsoft.public.windows.server.scripting)
  • Re: Impersonation issue with PsExec ?
    ... psexec actually installs the service on the remote machine on the fly every ...
    (microsoft.public.win2000.networking)
  • Re: Impersonation issue with PsExec ?
    ... psexec actually installs the service on the remote machine on the fly every ...
    (microsoft.public.windows.server.security)
  • Re: Impersonation issue with PsExec ?
    ... psexec actually installs the service on the remote machine on the fly every ...
    (microsoft.public.win2000.general)
  • Re: remote machine execution
    ... The current problem in psexec is they cannot pass "=" sign over to remote ... machines. ... version of psexec. ... What happens when you execute the command line locally on machine ...
    (microsoft.public.windows.server.scripting)