-3

I am trying to make an EXE file that will extract it's contents, put them in their proper DIR, then run the main startup file(fileOne.jar). You can see how I do so by watching this video --> [Here] <--, or read this

I ran IExpress, left everything at default settings, and added my files "fileOne.jar" "fileTwo.jar" "install.bat" than I set "install.bat" as the install command. Install.bat's command -->

MD Program move fileOne.jar Program move fileTwo.jar Program move Program C:/"Program Files" fileOne.jar

But every time I create one, it gives me an error:Error

What am I doing wrong? Do I need a different type of file to put in the installation command in? If so, do I need to know a new programming language?

  • 1
    Nothing in that error message says anything about a .exe, and you've not said how you're trying to create one. We're not going elsewhere to figure out what you're asking; include the relevant content here in your post.`command.com` hasn't existed for the last decade, since cmd.exe was introduced. It's totally unclear what you're asking, because there's so much that doesn't make sense. Please [edit] your question and make it more clear, with the necessary batch file code **here**, and without our having to leave this site and open anything in a new tab to figure out what you're asking. – Ken White Dec 19 '15 at 04:16
  • @KenWhite I will do so............ –  Dec 19 '15 at 04:26
  • 1
    I don't see the reason question is downvoted. This an old frustrating issue with `IEXpress` and could be confusing for a people not familiar with it. – npocmaka Dec 19 '15 at 08:01
  • Please note: There are many different packages that can compile batch files.. see here: http://www.robvanderwoude.com/scriptcompilers.php – Leptonator Dec 19 '15 at 15:59

2 Answers2

3

This is an known issue (at the bottom of the page) with the IEXpress. The tool is really ancient - from the times when the command.com was the default command processor.The workaround is to use cmd.exe /c install.bat when you call your installation script.

npocmaka
  • 55,367
  • 18
  • 148
  • 187
  • @JackKirby - iexpress is still working....visual studio comes with some tools for MSI packaging. Check also [this](http://stackoverflow.com/questions/1042566/how-can-i-create-an-msi-setup) – npocmaka Oct 02 '16 at 03:25
1

You really need to thoroughly debug this script before deploying in an installer.

Once you get the script thoroughly debugged, then you can use the installer.

IExpress, InstallShield, etc. are tricky in the sense you have to work with the temp folders, and such.

Your Original script:

MD Program
move fileOne.jar Program
move fileOne.jar Program
move Program C:/"Program Files"
fileOne.jar

Issues:

  1. You should never need to move fileone.jar to the same folder twice.
  2. Since you are running the batch file inside an executable, you need to specify the path and directory as you have discovered this is running as you, but in a %TEMP% folder.
  3. Windows is not *NIX, Mac or the web. Your forward slash, must be a backslash.

Taking your code, we re-write as - I will not get into Java/JDK configuration here, but you should see what is going on:

IF NOT EXIST "C:\INSTALLER\." MD "C:\INSTALLER"
7Z -y x YourZipfile.zip -oC:\installer
IF NOT EXIST "C:\Program\." MD "C:\Program"
IF EXIST C:\INSTALLER\fileOne.jar move C:\INSTALLER\fileOne.jar C:\Program
IF EXIST C:\INSTALLER\fileTwo.jar move C:\INSTALLER\fileTwo.jar C:\Program
IF NOT EXIST "C:\Program Files\Program\." move C:\Program "C:\Program Files"
IF EXIST "C:\Program Files\Program\fileOne.jar" %JAVA_HOME%\bin\Java.exe" "C:\Program Files\Program\fileOne.jar"
Leptonator
  • 3,379
  • 2
  • 38
  • 51
  • Right, I did not mean to have it move fileone.jar twice, I meant for it to move fileone.jar, then filetwo.jar :3 –  Oct 01 '16 at 21:39