[izpack-user] Trouble installing to C:\Program Files on Vista and Windows 7

895 views
Skip to first unread message

Ian Leslie

unread,
Sep 1, 2011, 7:50:28 AM9/1/11
to us...@izpack.codehaus.org
I am using izPack 4.3.4 to install my program but I cannot get it to install to the C:\Program Files directories.  Installing to another directory works as expected.

By default izPack presents the directory "C:\Program Files (x86)\Whose Turn Is It" as the default  install directory for my application - good so far.  But when any one tries to actually install it there the get the error message "This directory can not be written! Please choose another directory!".  Same thing happens with "C:\Program Files\Whose Turn Is It".  This happens for users who have admin privileges and those to do not. After a bit of reading I see that I can set the install process to request admin privledges using the run-privileged element.  So I added this:
<run-privileged condition="izpack.windowsinstall.7|izpack.windowsinstall.vista|izpack.windowsinstall.7"/>
to my info element in install.xml file. 

Now when I run the install I am prompted with the UAC "A program needs your permission to continue" prompt.  When I say yes I get this error dialog "Unable to access jarfile p:\WhoseTurnIsIt\WhoseTurnInstall_win64.jar" and that is the end of the process.  I never see the install dialog. Running from a command window does not show any additional information in the console.

Any help or advice would be appreciated.

Ian

--
Ian Leslie - Shareware Author (mailto:ian.l...@lesliesoftware.com)
http://www.lesliesoftware.com

Julien Ponge

unread,
Sep 7, 2011, 4:48:13 PM9/7/11
to us...@izpack.codehaus.org
And of course you have no issue if installing from somewhere else than
"Program Files", right?

--
Julien Ponge
http://julien.ponge.info/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Ian Leslie

unread,
Sep 8, 2011, 8:24:23 AM9/8/11
to us...@izpack.codehaus.org
Correct, my app installed and runs fine form other directories. I am looking for a way to either get the installer to install to the Program Files directory or to have the install program pick a different default install directory.

Thanks for your help,

Ian

Bernd Laengerich

unread,
Sep 8, 2011, 10:12:03 AM9/8/11
to us...@izpack.codehaus.org
Am 08.09.2011 14:24, schrieb Ian Leslie:

> Correct, my app installed and runs fine form other directories. I am looking
> for a way to either get the installer to install to the Program Files
> directory or to have the install program pick a different default install
> directory.
>
> Thanks for your help,

It may be not of great help, but I made an installer for a component that runs
fine on Vista with unconditional <run-privileged/> with izpack 4.3.3 and
installs to the program files directory.
What makes me helpless is the fact that you say it will not even show up any
panel.

Bernd

Ian Leslie

unread,
Sep 25, 2011, 8:43:10 AM9/25/11
to us...@izpack.codehaus.org

Thanks for your advice. Changing to an unconditional run privileged did not help me. I am using 4.3.4. Is it still possible to download 4.3.3?

Ian

--
sent from my android phone

Ronald Kayondo

unread,
Sep 25, 2011, 9:06:53 AM9/25/11
to us...@izpack.codehaus.org
Hi Ian, 
I did a not so clean work around for this issue. I wrapped my jar file in the launch4j wrapper(or any .exe wrapper) and named the file "NameOfApp-Install.exe". Vista automatically elevates the privileges of all file names that include the word "setup" or "install". Of-course the drawback to this is that the file name always has to have the "install" word otherwise the user will have to right click and select run as admin option.Hope it helps.

Regards,
Ronald.
--
Ronald. K

Ian Leslie

unread,
Sep 25, 2011, 11:19:16 AM9/25/11
to us...@izpack.codehaus.org
That sounds brilliant - so I gave it a try.

I executed this command line:

P:\WhoseTurnIsItInstall>"c:\Program Files
(x86)\IzPack\utils\wrappers\izpack2exe\izpack2exe.py"
--file=WhoseTurnInstall_
win64.jar
Traceback (most recent call last):
File "C:\Program Files
(x86)\IzPack\utils\wrappers\izpack2exe\izpack2exe.py", line 119, in
<module>
main()
File "C:\Program Files
(x86)\IzPack\utils\wrappers\izpack2exe\izpack2exe.py", line 116, in
main
create_exe(parse_options())
File "C:\Program Files
(x86)\IzPack\utils\wrappers\izpack2exe\izpack2exe.py", line 77, in
create_exe
subprocess.call(p7zcmd, shell=use_shell)
File "C:\Python27\lib\subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 679, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

Oops that is not good. Reading the manual I don't see what is wrong
here Am I missing something obvious?

Thanks,

Ian


On Sun, Sep 25, 2011 at 9:06 AM, Ronald Kayondo <kayo...@gmail.com> wrote:
> Hi Ian,
> I did a not so clean work around for this issue. I wrapped my jar file in
> the launch4j wrapper(or any .exe wrapper) and named the file
> "NameOfApp-Install.exe". Vista automatically elevates the privileges of all
> file names that include the word "setup" or "install". Of-course the
> drawback to this is that the file name always has to have the "install" word
> otherwise the user will have to right click and select run as admin
> option.Hope it helps.
> Regards,
> Ronald.

---------------------------------------------------------------------

Julien CARSIQUE

unread,
Sep 27, 2011, 1:28:21 PM9/27/11
to us...@izpack.codehaus.org, Ian Leslie
Here's the command line I use:
python .../izpack2exe/izpack2exe.py --file=myproject.jar --output=myproject.exe

Maybe were you missing the "output" parameter?

Le 25/09/11 17:19, Ian Leslie a �crit :

--
Julien Carsique, DevOps, Nuxeo (Paris, France)
www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform

Ian Leslie

unread,
Sep 28, 2011, 11:47:19 AM9/28/11
to us...@izpack.codehaus.org
Nope same error when I adjust the command line:
P:\WhoseTurnIsItInstall>c:\python27\python "c:\Program Files

(x86)\IzPack\utils\wrappers\izpack2exe\izpack2exe.py"
--file=WhoseTurnInstall_win64.jar --output=WhoseTurnInstall_win64.exe

Traceback (most recent call last):
File "c:\Program Files

(x86)\IzPack\utils\wrappers\izpack2exe\izpack2exe.py", line 119, in
<module>
main()
File "c:\Program Files

(x86)\IzPack\utils\wrappers\izpack2exe\izpack2exe.py", line 116, in
main
create_exe(parse_options())
File "c:\Program Files

(x86)\IzPack\utils\wrappers\izpack2exe\izpack2exe.py", line 77, in
create_exe
subprocess.call(p7zcmd, shell=use_shell)
File "c:\python27\lib\subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "c:\python27\lib\subprocess.py", line 679, in __init__
errread, errwrite)
File "c:\python27\lib\subprocess.py", line 893, in _execute_child

startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

On Tue, Sep 27, 2011 at 1:28 PM, Julien CARSIQUE <jcar...@nuxeo.com> wrote:
> Here's the command line I use:
> python .../izpack2exe/izpack2exe.py --file=myproject.jar --output=myproject.exe
>
> Maybe were you missing the "output" parameter?

---------------------------------------------------------------------

Ian Leslie

unread,
Sep 28, 2011, 11:54:24 AM9/28/11
to us...@izpack.codehaus.org
Reading the code it seems like the problem is the shell call to
7za.exe. It looks like it cannot find the 7 zip exe. I'll look at
how my path etc. are setup.

On Wed, Sep 28, 2011 at 11:47 AM, Ian Leslie
<ian.l...@lesliesoftware.com> wrote:
> Nope same error when I adjust the command line:

---------------------------------------------------------------------

Ian Leslie

unread,
Sep 28, 2011, 1:05:32 PM9/28/11
to us...@izpack.codehaus.org
I am not sure why 7za and upx were not being found automatically but
once I specified --with-7z and --no-upx it worked. Now I just have to
try the resulting install .exe file on my trouble some Vista box and
hope for the best.

Ian

On Wed, Sep 28, 2011 at 11:54 AM, Ian Leslie

Ian Leslie

unread,
Oct 11, 2011, 11:23:23 AM10/11/11
to us...@izpack.codehaus.org
Well this experience is pretty annoying. The newly created install
will not run on my Vista machine. It gives me a "cannot run the
executable <path to installer>\WhoseTurnIsIt-0.9.16.exe". Even though
that is the file I just ran. What the...

On my windows 7 box it all works fine.

Does this make sense to anyone? I don't even know what that error
message could possibly mean. It is telling me it cannot run the file
I just ran.

Ian

Reply all
Reply to author
Forward
0 new messages