killalltasks fatal error: 5: access denied

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
psanchez
Messages: 9
Registration: Sep 10, 2018 - 05:58

September 10, 2018 - 06:34

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
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

September 11, 2018 - 09:10

We should try a manual kill to see if the problem only occurs with wapt.

Strange.
psanchez
Messages: 9
Registration: Sep 10, 2018 - 05:58

September 12, 2018 - 08:04

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.
User avatar
dcardon
WAPT Expert
Messages: 1930
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

September 21, 2018 - 7:26 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
psanchez
Messages: 9
Registration: Sep 10, 2018 - 05:58

October 10, 2018 - 03:02

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.
User avatar
dcardon
WAPT Expert
Messages: 1930
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

October 10, 2018 - 12:19

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked