Creating AutoCAD 2012 Package

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
User avatar
lduriez
Messages: 17
Registration: Sep 2, 2015 - 09:16
Location: Roubaix
Contact :

October 29, 2015 - 11:55

Good morning,

I am contacting you because I am facing a problem creating a WAPT package for AutoCAD Architecture 2012.

To create my package, I first made a "distribution" of AutoCAD to customize my installation.

Next, I tested the silent installation using the classic Windows command prompt with this "distribution" to see if it worked and met my requirements. It went smoothly.

So I then created my WAPT package, running the same command, and that's where the problem arose: the installation didn't work. I got an AccessDenied error from somewhere. It's probably related to the fact that WAPT installs as System and not Administrator.

If you have ever packaged AutoCAD or have any ideas on how to solve my problem, I would be very grateful.

Luc

setup.py

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = ['AutoCAD Architecture 2012 - Français'']

def install():
    print('installing uvhc-autocad2012')
    run(r'".\AdminImage\setup.exe" /qb /I wapt.ini /language fr-fr')
log

Code: Select all

2015-10-27 11:31:11,092 CRITICAL Package uvhc-autocad2012 (=6.7.49.0-9) not installed due to errors : CalledProcessError: Command '('".\\AdminImage\\setup.exe" /qb /I wapt.ini /language fr-fr',)' returned non-zero exit status 1618
2015-10-27 11:31:11,107 CRITICAL Exception: Erreur lors de l'installation de uvhc-autocad2012 (=6.7.49.0-9) : {'skipped': [], 'additional': [], 'downloads': {'downloaded': [], 'skipped': [u'C:\\wapt\\cache\\uvhc-autocad2012_6.7.49.0-9_all.wapt'], 'errors': []}, 'remove': [], 'upgrade': [], 'install': [(u'uvhc-autocad2012 (=6.7.49.0-9)', PackageEntry('uvhc-autocad2012','6.7.49.0-9'))], 'errors': [[u'uvhc-autocad2012 (=6.7.49.0-9)', PackageEntry('uvhc-autocad2012','6.7.49.0-9')]], 'unavailable': []}
2015-10-27 11:33:52,357 ERROR Traceback (most recent call last):
  File "C:\wapt\lib\site-packages\rocket\main.py", line 143, in start
    time.sleep(THREAD_STOP_CHECK_INTERVAL)
IOError: [Errno 4] Interrupted function call

installing uvhc-autocad2012
2015-10-29 11:32:13,055 CRITICAL Fatal error in install script: AccessDenied: (pid=4508):Traceback (most recent call last):
  File "C:\wapt\common.py", line 3266, in install_wapt
    exitstatus = setup.install()
  File "c:\windows\temp\wapttljtvk\setup.py", line 25, in install
    run(r'".\AdminImage\setup.exe" /qb /I wapt.ini /language fr-fr')
  File "C:\wapt\common.py", line 3113, in run
    return setuphelpers.run(*arg,pidlist=self.pidlist,**args)
  File "C:\wapt\setuphelpers.py", line 957, in run
    killtree(proc.pid)
  File "C:\wapt\setuphelpers.py", line 1037, in killtree
    parent.kill()
  File "C:\wapt\lib\site-packages\psutil\__init__.py", line 258, in wrapper
    return fun(self, *args, **kwargs)
  File "C:\wapt\lib\site-packages\psutil\__init__.py", line 1034, in kill
    self._proc.kill()
  File "C:\wapt\lib\site-packages\psutil\_pswindows.py", line 192, in wrapper
    raise AccessDenied(self.pid, self._name)
AccessDenied: (pid=4508)

2015-10-29 11:32:19,256 WARNING Unable to clean tmp dir
2015-10-29 11:32:19,601 CRITICAL Package uvhc-autocad2012 (=6.7.49.0-9) not installed due to errors : AccessDenied: (pid=4508)
2015-10-29 11:32:19,645 CRITICAL Exception: Erreur lors de l'installation de uvhc-autocad2012 (=6.7.49.0-9) : {'skipped': [], 'additional': [], 'downloads': {'downloaded': [], 'skipped': [u'C:\\wapt\\cache\\uvhc-autocad2012_6.7.49.0-9_all.wapt'], 'errors': []}, 'remove': [], 'upgrade': [], 'install': [(u'uvhc-autocad2012 (=6.7.49.0-9)', PackageEntry('uvhc-autocad2012','6.7.49.0-9'))], 'errors': [[u'uvhc-autocad2012 (=6.7.49.0-9)', PackageEntry('uvhc-autocad2012','6.7.49.0-9')]], 'unavailable': []}
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

October 29, 2015 - 12:33

Good morning,
The initial error appears to be code 1618 (-> another installation with MSI is already in progress).
The AccessDenied error appears to be a consequence of the initial mistake; wapt attempts to kill the process it launched if it is still "alive" when it relinquishes control. Perhaps the installer relinquishes control before it has had time to unload its workload.

The AutoCAD installer is surely quite large.
Check if the default 10-minute timeout for the "run" command is appropriate...

Otherwise, increase it with the timeout parameter=

Code: Select all

run(r'".\AdminImage\setup.exe" /qb /I wapt.ini /language fr-fr',timeout=60*60)
Tranquil IT
Locked