On test machine using Izpack 5 Beta 11 if I start install.jar using a 64bit winrun4j exe running bundled 64 bit java then Izpack complains
There is no script engine for file extension ".js"
,
then complains The installer could not launch with administrator permissions
,
then an attempt to install into the default installation directory fails because you don't have admin permissions, installation to another folder outside of C:/Program Files completes okay
Whereas if I run it with 32bit winrun4j installer running 32 bit java it works fine.
if I just run install.jar directly without the exe wrapper
i.e java -jar install.jar
it gives these errors using both 32bit JVM and 64bit JVM.
so my only working solution at the moment is installation with 32bit exe wrapper, but I also need 64 bit wrapper.
So questions are
- Why is 32bit exe working and 64 bit exe not working
- Why does neither 32bit or 64bit if I try and install without the wrapper.
Followup
I found this thread about the javascript error (but not Izpack) and found that .js files were associated with Utlradedit, the editor I use for editing most file types.
Simply unassociating .js with Ultraedit means that now when I run
- java -jar install.jar using 32bit java on 32bit install.jar
- java -jar install.jar using 64bit java on 64bit install.jar
- 32 bit winrun4j wrapper.
it now works :)
But 64bit winrun4j now fails to start the installation and doesnt work at all, if I run from Command Window I can see that instead
of running
wscript C:\Users\MESH\AppData\Local\Temp\Installer.js
c:\Code\WidgetReleases\1.0_Beta_2\widget-windows64\JVM64\bin\javaw.exe
-Dizpack.mode=privileged -jar
C:\Code\WidgetReleases\1.0_Beta_2\widget-windows64\install.jar
they ran
wscript C:\Users\MESH\AppData\Local\Temp\Installer.js
c:\Code\WidgetReleases\1.0_Beta_2\widget-windows64\JVM64\bin\javaw.exe
abort exit
-Dizpack.mode=privileged -jar
:\Code\WidgetReleases\1.0_Beta_2\widget-windows64\install.jar
So follow up questions are:
- Why does simply associating filetype with an editor break this javascript stuff, I can imagine that this or a similar problem could effect alot of users.
- Why would running from my 64 bit wrapper cause installer.js to run Abort Exit
CodePudding user response:
There are four questions asked here:
- Why is 32bit exe working and 64 bit exe not working
- Why does neither 32bit or 64bit if I try and install without the wrapper.
- Why does simply associating filetype with an editor break this javascript stuff, I can imagine that this or a similar problem could effect alot of users.
- Why would running from my 64 bit wrapper cause installer.js to run Abort Exit
I will attempt to answer them:
Errors and bugs sometimes in programs that are supposed to 'seamlessly' handle both 32- and 64-bit; one example is Symantec's SEP definition repair program - it works sometimes but not all. Your comment confirms these bugs, and you've even identified a competing program that does not error in this 32/64 handling: "Haven't solved this problem but have worked around it by running the installer using launch4j instead of winrun4j". Congrats! :)
I suspect the requisite app/wrapper is not in your system's PATH. Two folders in your path are C:\WINDOWS, and C:\WINDOWS\SYSTEM32. At the command prompt, type the word
SET
(caps not needed). An alphabetically-sorted list of variables appear. In the one that says PATH= look for the full folder path of wrapper that you expect to launch your app. It's likely not there. It can be added if you like.Good question, but there's a good reason: by associating a filetype to open with a program, you're telling your computer to always open the file, in this case ending with .js, with a file editor. It's doing what you told it to do, not what you intended. A popular way to get what you intended is to re-associate the file with the program it had before (you would likely know which one is best), and to edit the file, add your favorite JS editor to the "Open With..." option in Windows Explorer's right-click menu. I can find and link to a page or two on how to do this, if you like.
I believe this is strongly tied to question and answer #1.
Let me know if this helps.
CodePudding user response:
Changing the default action for .js files causes problems for the same reason that changing the default action for .exe files would cause problems. Programs expect that the default action for another program will be to run it. Editing should always be a right-click action and not the default.