[python-win32] Understanding "Access Denied" when calling win32process.TerminateProcess() from Run As Administrator prompt

2013-10-01 Thread Tony Cappellini
When running  from a *"Run As Administrator"* prompt on Windows 7
Professional 32-Bit,

my Top-level python script spawns a process (which is another python
script) using os.spawnv( )

When the top-level script ends, it attemps to call
win32process.TerminateProcess() with the handle
that was created during the os.spawnv() call.

win32process.TerminateProcess(self._handle, exitCode)
pywintypes.error: (5, 'TerminateProcess', 'Access is denied.')

is displayed.

This runs on Windows XP just fine. Obviusly, Windows 7 is more stringent
with security concerns.
We use Python 2.3, so subprocess and multiprocess are not available.


I don't understand why this is an issue when running from the "Run As
Administrator" prompt.

Are there any other workarounds- until we migrate to Python 2.7?

Thanks
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Understanding "Access Denied" when calling win32process.TerminateProcess() from Run As Administrator prompt

2013-10-01 Thread Michel Claveau
Hi!

"Run As Administrator" prompt on Windows 7 has several oddities.
e.g.  if you have mapped disks (on LAN), try to doDIR  R:with 
command-line  "As Administrator" and "As User"  ...and you the problem.

@-salutations
-- 
Michel Claveau 

  - Original Message - 
  From: Tony Cappellini 
  To: python-win32@python.org 
  Sent: Tuesday, October 01, 2013 9:03 PM
  Subject: [python-win32] Understanding "Access Denied" when calling 
win32process.TerminateProcess() from Run As Administrator prompt




  When running  from a "Run As Administrator" prompt on Windows 7 Professional 
32-Bit,


  my Top-level python script spawns a process (which is another python script) 
using os.spawnv( )


  When the top-level script ends, it attemps to call 
win32process.TerminateProcess() with the handle

  that was created during the os.spawnv() call.


  win32process.TerminateProcess(self._handle, exitCode)
  pywintypes.error: (5, 'TerminateProcess', 'Access is denied.')


  is displayed.


  This runs on Windows XP just fine. Obviusly, Windows 7 is more stringent with 
security concerns.

  We use Python 2.3, so subprocess and multiprocess are not available.




  I don't understand why this is an issue when running from the "Run As 
Administrator" prompt.


  Are there any other workarounds- until we migrate to Python 2.7?

  Thanks



--


  ___
  python-win32 mailing list
  python-win32@python.org
  https://mail.python.org/mailman/listinfo/python-win32
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Understanding "Access Denied" when callingwin32process.TerminateProcess() from Run As Administrator prompt

2013-10-01 Thread Michel Claveau
Re !

The best (for me) solution:  down the UAC-level to zero...

@-salutations
-- 
Michel Claveau 

  - Original Message - 
  From: Michel Claveau 
  To: cappy2...@gmail.com ; python-win32@python.org 
  Sent: Tuesday, October 01, 2013 9:57 PM
  Subject: Re: [python-win32] Understanding "Access Denied" when 
callingwin32process.TerminateProcess() from Run As Administrator prompt


  Hi!

  "Run As Administrator" prompt on Windows 7 has several oddities.
  e.g.  if you have mapped disks (on LAN), try to doDIR  R:with 
command-line  "As Administrator" and "As User"  ...and you the problem.

  @-salutations
  -- 
  Michel Claveau 

- Original Message - 
From: Tony Cappellini 
To: python-win32@python.org 
Sent: Tuesday, October 01, 2013 9:03 PM
Subject: [python-win32] Understanding "Access Denied" when calling 
win32process.TerminateProcess() from Run As Administrator prompt




When running  from a "Run As Administrator" prompt on Windows 7 
Professional 32-Bit,


my Top-level python script spawns a process (which is another python 
script) using os.spawnv( )


When the top-level script ends, it attemps to call 
win32process.TerminateProcess() with the handle

that was created during the os.spawnv() call.


win32process.TerminateProcess(self._handle, exitCode)
pywintypes.error: (5, 'TerminateProcess', 'Access is denied.')


is displayed.


This runs on Windows XP just fine. Obviusly, Windows 7 is more stringent 
with security concerns.

We use Python 2.3, so subprocess and multiprocess are not available.




I don't understand why this is an issue when running from the "Run As 
Administrator" prompt.


Are there any other workarounds- until we migrate to Python 2.7?

Thanks






___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32



--


  ___
  python-win32 mailing list
  python-win32@python.org
  https://mail.python.org/mailman/listinfo/python-win32
___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32