[SOLVED] Matlab - no installation

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
SK62
Messages: 2
Registration: December 19, 2019 - 09:25

December 19, 2019 - 9:35 AM

Good morning,
When I try to install the attached package,

Code: Select all

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

uninstallkey = []

def install():
    print('Installation Matlab_2019')
    mkdirs('c:\\temp')
    shutil.copy(r'\\srv-turing\Programmes\Matlab\R2019b\Licences\%s.lic' %get_computername(), r'C:\temp\license19b.lic')
    cmd = "//srv-turing/Programmes/Matlab/R2019b/setup.exe -inputFile \\srv-turing\Programmes\Matlab\R2019b\bp_input.txt"

    print (cmd)
    run_notfatal(cmd,timeout=60*60)

    while isrunning('Setup'):
        print ('Install en cours. Merci de patienter... :)')
        time.sleep(600)

    print('Installation terminée !!!')

def uninstall():
    print('desinstallation Matlab_2019')
    cmd = "C:\Program Files\MATLAB\R2019b\uninstall\bin\win64\uninstall.exe -inputFile \\srv-turing\Programmes\Matlab\R2019b\bp_uninstaller_input.txt"
The license copying process goes well, the setup seems to start since it appears in the processes, but no installation takes place.
the package fails in the console with
Installation Matlab_2019//srv-turing/Programmes/Matlab/R2019b/setup.exe -inputFile \srv-turing\Programmes\Matlab\R2019bp_input.txt
Install in progress. Please wait... :)[Error 32] The process cannot access the file because it is being used by another process: 'c:\\windows\\temp\\waptbsx_zt' [Error 32] The process cannot access the file because it is being used by another process: 'c:\\windows\\temp\\waptbsx_zt' [Error 32] The process cannot access the file because it is being used by another process: 'c:\\windows\\temp\\waptbsx_zt' Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 3846, in install_wapt
exitstatus = setup.install()
File "c:\windows\temp\waptbsx_zt\setup.py", line 18, in install
NameError: global name 'time' is not defined
NameError: global name 'time' is not defined
Do you have any ideas to help me out?

Sincerely
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

December 19, 2019 - 09:46

Good morning

We are missing the time import

just add

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *
import shutil
import time
SK62
Messages: 2
Registration: December 19, 2019 - 09:25

December 20, 2019 - 7:48 AM

Hello,
Yes, thank you for pointing out the obvious import error. This fixes the error in WAPT, but it still doesn't allow me to install MATLAB. The setup process runs correctly, but nothing happens. Is this a permissions issue?
Does WAPT run the executable with administrator privileges?

Thank you for any suggestions, and happy holidays!
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

January 2, 2020 - 11:37

Wapt launches installations with the system account, therefore with maximum rights...

On the other hand, in pyscripter or with the wapt-get install command, the installation is launched with the administrator account which executes the installation.
Vincent
Messages: 2
Registration: Nov 06, 2018 - 5:17 p.m.

April 23, 2020 - 8:32 PM

Hello,

I'm reviving this thread, but it might be useful to others.

Your problem might stem from a timeout that's too short for Matlab. I set mine to 7200. That's more than enough for machines with SSDs, but necessary for older generation hard drives or for testing packaging with a virtual machine.

V.
JPBUTT
Messages: 8
Registration: March 1, 2021 - 3:36 PM

March 1, 2021 - 3:42 PM

Hello,
I'm trying to create a Matlab package and I'm encountering the same difficulties as you with the Matlab installation, with a Matlab process that won't close.
Have you found a solution?




# -*- coding: utf-8 -*-
from setuphelpers import *
import time
uninstallkey = []

def install():
print ('Copying installation files')
mkdirs('C:\\MATLAB')
filecopyto('license.lic',r'C:\MATLAB')
filecopyto('UTT_installer_input.txt',r'C:\MATLAB')
##copytree2(r'\\lune.utt.fr\software\MATLAB','C:\\MATLAB')
##time.sleep(900)
print('Matlab installation')
run(r'"setup.exe" -inputFile "C:\MATLAB\UTT_installer_input.txt"')
##cmd = "setup.exe -inputFile C:\MATLAB\UTT_installer_input.txt"
time.sleep(7200)
print('copy the uninstallation response file')
filecopyto('UTT_uninstaller_input.txt',r'C:\Program Files\MATLAB\R2019\uninstall')



def uninstall():
print('uninstall Matlab_2019')
run(r'"C:\Program Files\MATLAB\R2019\uninstall\bin\win64\uninstall.exe" -inputfile "C:\Program Files\MATLAB\R2019\uninstall\UTT_uninstaller_input.txt"')
time.sleep(7200)
remove_tree(r'C:\Program Files\MATLAB')

Copying installation files
Matlab installation
[Error 5] Access refused: 'c:\\windows\\temp\\waptufzl6z\\bin\\win64\\instlic_4a.dll'
[Error 5] Access refused: 'c:\\windows\\temp\\waptufzl6z\\bin\\win64\\instlic_4a.dll'
[Error 5] Access refused: 'c:\\windows\\temp\\waptufzl6z\\bin\\win64\\instlic_4a.dll'
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 3877, in install_wapt
exitstatus = setup.install()
File "c:\windows\temp\waptufzl6z\setup.py", line 14, in install
run(r'"setup.exe" -inputFile "C:\MATLAB\UTT_installer_input.txt"')
File "C:\Program Files (x86)\wapt\common.py", line 3647, in run
return ensure_unicode(setuphelpers.run(*arg,**args))
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 3703, in run
raise TimeoutExpired(cmd,''.join(output),timeout)
TimeoutExpired: Command '"setup.exe" -inputFile "C:\MATLAB\UTT_installer_input.txt"' timed out after 600 seconds with output ''''
TimeoutExpired: Command '"setup.exe" -inputFile "C:\MATLAB\UTT_installer_input.txt"' timed out after 600 seconds with output ''''
Locked