Page 1 of 1

killalltasks fatal error: 5: access denied

Published: September 10, 2018 - 06:34
by psanchez
Good morning,

WAPT 1.5.1.26
Windows Server 2008R2
Windows 10 Pro 64x developer

I think it's all in the title.

Here is the context of the problem:
development of a package for a very basic portable application.

Code: Select all

# -*- coding: utf-8 -*-
#
# Installation de l'aplli portable Graph85Emulator
#
from setuphelpers import *

uninstallkey = []

# environnement d'installation du paquet
targetdrive = 'c:'
targetdepot = 'applis'
targetsousdepot = 'math'
targetdos = 'graph85emulator'
exename = 'GRAPH85emulator.exe'

targetdir = makepath(targetdrive,targetdepot,targetsousdepot,targetdos)


def install():
    #print(targetdir)
    mkdirs(targetdir)
    filecopyto(exename,targetdir)
    create_desktop_shortcut('Graph85Emulator',target=makepath(targetdir,exename))

def uninstall() :
    killalltasks(exename)
    remove_desktop_shortcut(targetdos)
    if isdir(targetdir):
        remove_tree(targetdir)
Installation or uninstallation works without problems unless the application is running on the computer.
In this case, the uninstallation stops at killallstasks with the message ERROR: 5: Access denied

It's probably something really simple, but I'm going in circles.
Help someone?
THANKS

Sincerely

Re: killalltasks fatal error: 5: access denied

Published: September 11, 2018 - 09:10
by sfonteneau
We should try a manual kill to see if the problem only occurs with wapt.

Strange.

Re: killalltasks fatal error: 5: access denied

Published: September 12, 2018 - 08:04
by psanchez
Hello,

the process kills without any problem using Task Manager.

I was imprecise in describing my environment.
The WAPT server runs on a Windows 7 VM on a Windows Server 2008 R2 server, and
the development console runs on a Windows 7 VM on a Windows 10 machine.
Why make things simple when...

The problem with killalltasks getting stuck occurs on both the development VM and a test machine running Windows 10.

Re: killalltasks fatal error: 5: access denied

Published: September 21, 2018 - 7:26 PM
by dcardon
Hello psanchez,
psanchez wrote: Sep 12, 2018 - 08:04 The process kills without any problem using Task Manager.

I was imprecise in describing my environment.
The WAPT server runs on a Windows 7 VM on a Windows 2008 R2 server.
The development console runs on a Windows 7 VM on a Windows 10
. Why make it simple when...

The blocking problem with killalltasks occurs on the development VM as well as on a test machine running Windows 10.
Does the problem occur during package creation in PyScripter, or during deployment to the machine? If it occurs during creation in PyScripter, check if you have any UAC issues.
Furthermore, you should also add a killlalltasks during installation, which could also be an update...

Sincerely,

Denis

Re: killalltasks fatal error: 5: access denied

Published: October 10, 2018 - 03:02
by psanchez
Hello,

sorry for the late reply, I've been swamped with work.

The problem occurs both in PyScripter and on a deployed machine.

Thank you for the suggestion to add killalltask to the installation.

I'm thrilled; I've received the purchase order from my institution for the Enterprise version.

Best regards.

Re: killalltasks fatal error: 5: access denied

Published: October 10, 2018 - 12:19 PM
by dcardon
Hello Patrick,
psanchez wrote: Oct 10, 2018 - 3:02 AM Sorry for the late reply, I got swamped with work.

The problem occurs both in PyScripter and on a deployed machine.

Thanks for the tip about adding killalltask to the installation.

I'm thrilled, I got the order form from my institution for the Enterprise version.
FYI, there is an undocumented "semi-feature" (it still needs some fine-tuning) that allows you to create a package from a standalone exe quite easily: you just need to create a directory and put the exe and other resources in it.
Then you run the wapt-get command, specifying the directory name (not the executable name):

Code: Select all

wapt-get make-template c:\temp\lenomdemonlogiciel
The make-template command will detect that it is a directory and not an install exe and it will create an automatic package which will paste the exe into a directory in program files (making the difference x86/x64), make an icon in the start menu and perform an uninstall procedure (which is not finished).

It's quite practical, although there's still some work to be done on our end. I'll talk to Simon about documenting it.

Sincerely,

Denis