Page 1 of 1

Creating AutoCAD 2012 Package

Published: October 29, 2015 - 11:55 AM
by lduriez
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': []}

Re: Creating an AutoCAD 2012 Package

Published: October 29, 2015 - 12:33
by htouvet
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)