Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #53565

Re: How to execute command on remote windows machine

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <random832@fastmail.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'received:internal': 0.09; 'subject:command': 0.09; 'subject:How': 0.10; 'windows': 0.15; 'command)': 0.16; 'guys,': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'subject:windows': 0.16; 'wrote:': 0.18; 'mechanism': 0.19; 'command': 0.22; 'machine': 0.22; 'fine': 0.24; 'permission': 0.26; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'to:no real name:2**1': 0.29; 'sep': 0.31; 'figure': 0.32; 'option': 0.32; 'received:66': 0.35; 'requirement': 0.35; 'there': 0.35; 'machine.': 0.36; 'received:10': 0.37; 'remote': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'from:no real name:2**0': 0.61; 'header:Message-Id:1': 0.63; 'email addr:gmail.com': 0.63; 'to:addr:gmail.com': 0.65; 'note:': 0.66; 'yourself': 0.78; '2013,': 0.91
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= message-id:from:to:mime-version:content-transfer-encoding :content-type:in-reply-to:references:subject:date; s=mesmtp; bh= oD6jijYR6yjMcGShupVOZTuqb7k=; b=BLfziCZDfNpEhrPWfJu5V7zfD9sq8k3n oplWyWShHZE/oQXa4gojQ1h0v1OxSCRsLDMgf/7Flnw02KbwcQlgCcVa72573RZ4 xdZCES2GE/+ZoRTXSysbcjPwKcl+Y9AeQnE7BkXgfUuApYbA8j+IO0yj3x07061+ qAPnykCVEHw=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=oD6jijYR6yjMcGShupVOZTuqb7k=; b=e+D BKYLhX9Ie9l4YJJy7rzjgDrFoQ3aPKEcf1xrYghgv0dTSADj463JOVcYMw3PjY84 BCxm56B8Zb/8anb2yEDSxWKi+PhpIxallz6FpBMueuphUq/evGkyP9gGk5jL3MGO wYjYts00R0OCn2LkIJ0TtUOKReGeEM0cD2jKfu2k=
X-Sasl-Enc 4sM2lYT6CBeR8sIBNMDuv1h8Hv/qSQk+9M1q/9kkNWut 1378211958
From random832@fastmail.us
To gaurangnshah@gmail.com, python-list@python.org
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Content-Type text/plain
X-Mailer MessagingEngine.com Webmail Interface - ajax-ed2f0e98
In-Reply-To <33a44ace-33d1-493f-85cb-4f0a093368af@googlegroups.com>
References <33a44ace-33d1-493f-85cb-4f0a093368af@googlegroups.com>
Subject Re: How to execute command on remote windows machine
Date Tue, 03 Sep 2013 08:39:18 -0400
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2.1378211961.5461.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1378211961 news.xs4all.nl 15979 [2001:888:2000:d::a6]:47113
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53565

Show key headers only | View raw


On Tue, Sep 3, 2013, at 0:45, gaurangnshah@gmail.com wrote:
> Hi Guys, 
> 
> I have a requirement where i need to kill one process on remote windows
> machine. 
> Following command just works fine if i have to kill process on local
> machine 
> 
> os.system('taskkill /f /im processName.exe')
> 
> However I am not able to figure out how to execute this command on remote
> windows machine. 
> 
> Note: my local machine is also windows (machine from where i have to
> execute command)
> 
> so is there any way i can execute command from windows machine on remote
> windows machine ?

The taskkill command actually has an option for this: /S. I don't know
what mechanism it uses or what you would have to do to give yourself
permission to use it.


-- 
Random832

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to execute command on remote windows machine gaurangnshah@gmail.com - 2013-09-02 21:45 -0700
  Re: How to execute command on remote windows machine Steven D'Aprano <steve@pearwood.info> - 2013-09-03 05:19 +0000
  Re: How to execute command on remote windows machine alex23 <wuwei23@gmail.com> - 2013-09-03 15:33 +1000
    Re: How to execute command on remote windows machine gaurangnshah@gmail.com - 2013-09-02 23:45 -0700
      Re: How to execute command on remote windows machine Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-09-03 22:54 -0400
  Re: How to execute command on remote windows machine random832@fastmail.us - 2013-09-03 08:39 -0400
  Re: How to execute command on remote windows machine 88888 Dihedral <dihedral88888@gmail.com> - 2013-09-03 07:21 -0700

csiph-web