in reply to (OT) executing a command on a remote Windows XP machine

If you have 2500 machines on a network prsumably you have Active Directory. All you need to do is add a logon script to your GPO I would have thought. See this tutorial There are many ways to execute things remotely. M$ turns them off progrssively as people exploit them. For example if you tried my Win32::KillProcess module it may or may not have worked depending on the availability of certain scripting features which are now ? disabled by default ? Given you comments about how hard it is to install Perl modules on Win32 (it is not, you simply need to know how) I would wonder if you are using the tools you have available correctly. When all else fails read the instructions ;-)

@echo off \\oywps01\snp109

cheers

tachyon

Replies are listed 'Best First'.
Re^2: (OT) executing a command on a remote Windows XP machine
by Anonymous Monk on Oct 07, 2004 at 13:26 UTC
    Thanks for enlightenment

    God Bless You.
Re^2: (OT) executing a command on a remote Windows XP machine
by blackadder (Hermit) on Oct 07, 2004 at 10:16 UTC
    Hi Ya,

    Yes we do, but its in NewYork and I am in a DR site here in London. I have no chance of accessing the AD or doing any thing with it.

    So I used this code
    use Win32::KillProcess qw( connectServer startProcess ); $server="SN02GEV14A"; $user="MOD\Blackadder_sup"; $pass="Perlmonks2004"; my $c = connectServer( $server, $user, $pass ); startProcess( $c, "cmd.exe /c start \\\\oywps01\\snp104");
    And I am getting this error
    C:\Perl>proc_start.pl Can't access WMI on remote machine SN02GEV14A: OLE exception from "SWb +emLocator": Access is denied. Win32::OLE(0.1701) error 0x80070005: "Access is denied" in METHOD/PROPERTYGET "ConnectServer" at C:/Perl/site/lib/Win32/Ki +llProcess.pm line 30.
    I posted the above on another thread in answer to how to install WIn32::KillProcess, But will continoue with this thread from now on to avoid duplication.

    Thanks
    Blackadder

      Which part of 'Access Denied' is confusing you ;-) You need to use a valid username and password.

      $user="DOM\username" # bound to fail $user="DOM\\username" # OK $user='DOM\username' # OK as well

      Once you fix that tt should work as the SWbemLocator you need running remotely provided that error. You do need valid credentials though. This works fine for me:

      use Win32::KillProcess ':all'; my $server = "Toshiba"; my $user = "WORKGROUP\\Administrator"; my $pass = "password"; my $c = connectServer( $server, $user, $pass ); showRunningProcess($c);

      cheers

      tachyon

        Thanks *Embarrassed*
        Blackadder