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

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

Replies are listed 'Best First'.
Re^3: (OT) executing a command on a remote Windows XP machine
by tachyon (Chancellor) on Oct 07, 2004 at 22:20 UTC

    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