<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi<br>
<br>
The argument "/ INI " needs an absolut path . The subject has been
discussed on the forum:<br>
<br>
<a class="moz-txt-link-freetext" href="https://forum.tranquil.it/viewtopic.php?f=9&t=466&start=10#p1193">https://forum.tranquil.it/viewtopic.php?f=9&t=466&start=10#p1193</a><br>
<br>
A solution :<br>
<br>
<pre><code class="hljs objectivec"><span class="hljs-meta">import os</span>
<span class="hljs-meta">uninstallstring = []</span>
<span class="hljs-meta">def install():</span>
<span class="hljs-meta"> curentpath = os.path.dirname(os.path.realpath(__file__))</span>
<span class="hljs-meta"> run(r'<span class="hljs-meta-string">"Firefox_Setup_45.0.1esr.exe"</span> -ms /INI=%s\file.ini' % curentpath ,timeout=300)
</span></code></pre>
<pre class="moz-signature" cols="72">Simon <a class="moz-txt-link-freetext" href="https://blog.lesfourmisduweb.org">https://blog.lesfourmisduweb.org</a>
</pre>
<div class="moz-cite-prefix">Le 17/05/2016 20:23, Denis Cardon a
écrit :<br>
</div>
<blockquote cite="mid:573B6187.5090008@tranquil-it-systems.fr"
type="cite">Hi Mariusz,
<br>
<br>
Le 17/05/2016 20:08, MBP Oświęcim - Informatyk a écrit :
<br>
<blockquote type="cite">Hi,
<br>
<br>
I tried to fork tis-firefox-esr and modify setup.py.
<br>
I added install.ini file to sources (alongside .exe and other
files).
<br>
Content of install.ini file is as below:
<br>
| [Install]
<br>
| InstallDirectoryName=Firefox
<br>
| QuickLaunchShortcut=true
<br>
| DesktopShortcut=true
<br>
| StartMenuShortcuts=true
<br>
| MaintenanceService=false
<br>
<br>
According to mozilla doc[1], usage should be easy as:
<br>
| Firefox_installer.exe /INI=install.ini
<br>
<br>
So I modified setup.py with following content:
<br>
|install_exe_if_needed(exe,silentflags='/INI=install.ini',key=ukey,min_version=version,killbefore='firefox.exe')
<br>
</blockquote>
<br>
when adding /INI=install.ini, you have removed the "-ms" silent
install flag. So probably firefox is waiting somewhere in the
background.
<br>
<br>
Could you try with:
<br>
<br>
install_exe_if_needed(exe,silentflags='-ms
/INI=install.ini',key=ukey,min_version=version,killbefore='firefox.exe')
<br>
<br>
By the way, how are you testing your packages? When you are in
pyscripter (package tis-waptdev), there is a wapt.psproj file
created in the \WAPT subdirectory with preconfigured targets
(install, debug, remove, etc.). Using those targets, you can
easily test and debug install scripts.
<br>
<br>
Be sure to be local admin and have UAC disabled when building
packages with pyscripter.
<br>
<br>
Cheers,
<br>
<br>
Denis
<br>
<br>
<blockquote type="cite">
<br>
<br>
Second parameter is passed as silentflags and it should do it's
job. But
<br>
when I try to deploy such package, installation fails with
timeout.
<br>
<br>
Main part of install function:
<br>
|version = control.version.split('-',1)[0]
<br>
|ukey = 'Mozilla Firefox %s ESR (x86 pl)'%version
<br>
|exe = 'Firefox Setup %sesr.exe'%version
<br>
|install_ini = os.path.abspath('install.ini')
<br>
|install_exe_if_needed(exe,silentflags='/INI'+install_ini,key=ukey,min_version=version,killbefore='firefox.exe',timeout=30)
<br>
<br>
<br>
And log output looks like[2]:
<br>
2016-05-17 20:05:01,052 INFO Status : Downloading
mbp-firefox-esr :
<br>
<a class="moz-txt-link-freetext" href="http://wapt.mbp/wapt/mbp-firefox-esr_45.1.1-31_all.wapt">http://wapt.mbp/wapt/mbp-firefox-esr_45.1.1-31_all.wapt</a> :
44515008 /
<br>
44515008 (100%) (11336 KB/s)
<br>
<br>
2016-05-17 20:05:01,052 INFO Status :
<br>
2016-05-17 20:05:01,062 INFO Package issued by C=PL,
<br>
L=O\xC3\x85\xC2\x9Bwi\xC3\x84\xC2\x99cim, O=MBP
<br>
O\xC3\x85\xC2\x9Bwi\xC3\x84\xC2\x99cim, OU=wapt-get,
<br>
<a class="moz-txt-link-abbreviated" href="mailto:CN=wapt.mbp/emailAddress=informatyk@mbp-oswiecim.pl">CN=wapt.mbp/emailAddress=informatyk@mbp-oswiecim.pl</a>
<br>
2016-05-17 20:05:01,062 INFO Register start of install
C:\Program
<br>
Files\wapt\cache\mbp-firefox-esr_45.1.1-31_all.wapt as user
SYSTEM to
<br>
local DB with params {}
<br>
2016-05-17 20:05:01,062 INFO Interactive user:SYSTEM, usergroups
None
<br>
2016-05-17 20:05:01,163 INFO Status : Installing package
mbp-firefox-esr
<br>
version 45.1.1-31 ...
<br>
2016-05-17 20:05:01,173 INFO Installing package C:\Program
<br>
Files\wapt\cache\mbp-firefox-esr_45.1.1-31_all.wapt
<br>
2016-05-17 20:05:01,173 INFO unzipping C:\Program
<br>
Files\wapt\cache\mbp-firefox-esr_45.1.1-31_all.wapt to temporary
<br>
c:\windows\temp\wapttdmtol
<br>
2016-05-17 20:05:01,344 INFO Package issued by C=PL,
<br>
L=O\xC3\x85\xC2\x9Bwi\xC3\x84\xC2\x99cim, O=MBP
<br>
O\xC3\x85\xC2\x9Bwi\xC3\x84\xC2\x99cim, OU=wapt-get,
<br>
<a class="moz-txt-link-abbreviated" href="mailto:CN=wapt.mbp/emailAddress=informatyk@mbp-oswiecim.pl">CN=wapt.mbp/emailAddress=informatyk@mbp-oswiecim.pl</a>
<br>
2016-05-17 20:05:01,444 INFO sourcing install file
<br>
c:\windows\temp\wapttdmtol\setup.py
<br>
2016-05-17 20:05:01,444 INFO Install parameters : {}
<br>
2016-05-17 20:05:01,453 INFO executing install script
<br>
2016-05-17 20:05:01,453 INFO Run "(u'"Firefox Setup
45.1.1esr.exe"
<br>
/INI="c:\\windows\\temp\\wapttdmtol\\install.ini"',)"
<br>
2016-05-17 20:05:07,072 INFO 192.168.0.191 - "GET
<br>
/tasks.json?uuid=BACCF0D7-CBD5-324D-84C4-8D9C0014E82D HTTP/1.1"
- 200
<br>
113866
<br>
2016-05-17 20:05:07,272 INFO (u'"Firefox Setup 45.1.1esr.exe"
<br>
/INI="c:\\windows\\temp\\wapttdmtol\\install.ini"',) command
returns code 0
<br>
Mozilla Firefox 45.1.1 ESR (x86 pl)
<br>
2016-05-17 20:05:07,282 CRITICAL Fatal error in install script:
<br>
EWaptSetupException: Fatal error : Setup Firefox Setup
45.1.1esr.exe has
<br>
been ran but the uninstall key Mozilla Firefox 45.1.1 ESR (x86
pl) can
<br>
not be found:
<br>
Traceback (most recent call last):
<br>
File "C:\Program Files\wapt\common.py", line 3178, in
install_wapt
<br>
exitstatus = setup.install()
<br>
File "c:\windows\temp\wapttdmtol\setup.py", line 84, in
install
<br>
<br>
install_exe_if_needed(exe,silentflags='/INI='+'"'+install_ini+'"',key=ukey,min_version=version,killbefore='firefox.exe')
<br>
<br>
File "c:\windows\temp\wapttdmtol\setup.py", line 68, in
<br>
install_exe_if_needed
<br>
error('Setup %s has been ran but the uninstall key %s can
not be
<br>
found' % (exe,key))
<br>
File "C:\Program Files\wapt\setuphelpers.py", line 3437, in
error
<br>
raise EWaptSetupException(u'Fatal error : %s' % reason)
<br>
EWaptSetupException: Fatal error : Setup Firefox Setup
45.1.1esr.exe has
<br>
been ran but the uninstall key Mozilla Firefox 45.1.1 ESR (x86
pl) can
<br>
not be found
<br>
<br>
2016-05-17 20:05:07,441 INFO Status :
<br>
2016-05-17 20:05:07,441 CRITICAL Package mbp-firefox-esr
(=45.1.1-31)
<br>
not installed due to errors : EWaptSetupException: Fatal error :
Setup
<br>
Firefox Setup 45.1.1esr.exe has been ran but the uninstall key
Mozilla
<br>
Firefox 45.1.1 ESR (x86 pl) can not be found
<br>
2016-05-17 20:05:07,441 CRITICAL Exception: Error during install
of
<br>
mbp-firefox-esr (=45.1.1-31): errors in packages mbp-firefox-esr
<br>
2016-05-17 20:05:07,453 INFO Status : Done: Update packages
installed on
<br>
host
<br>
<br>
Any ideas what I'm doing wrong?
<br>
<br>
[1] - <a class="moz-txt-link-freetext" href="https://wiki.mozilla.org/Installer:Command_Line_Arguments">https://wiki.mozilla.org/Installer:Command_Line_Arguments</a>
<br>
[2] - <a class="moz-txt-link-freetext" href="http://wklej.org/hash/2e439fdd419/">http://wklej.org/hash/2e439fdd419/</a>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>