2009-04-09 19:45 UTC
Back in 2007, velasquez said:
He apparently was not able to get his InnoSetup install script working.
I built one yesterday, and it works pretty well.
I was able to install the runtime using the MSI file with MSIEXEC. A big improvement over velasquez's attempt is that the Uninstall process also removes the MSI.
For those interested, the syntax for the MSIEXEC call is sort of convoluted:
Filename: misexec.exe; Parameters: "/i ""{app}\OpenDCL.Runtime.5.1.0.2.msi"""
Filename: misexec.exe; Parameters: "/x ""{app}\OpenDCL.Runtime.5.1.0.2.msi"""
So far I have not been able to get the "/passive" switch to work. The main thing that this does is to eliminate the "Preparing to install..." prompt. I'm guessing that the quotes will also be an obscure structure like the above.
The reason I used the {app} directory for the above is that if you use a {tmp} directory like velasquez did, the uninstall process won't be able to find the uninstall file, and the uninstall of the MSI will fail. The use of {tmp} means that InnoSetup will create its own temporary directory during installation and then delete it, making it unavailable at uninstall time.
During the uninstall, you see the usual "Are you sure you want to remove XXX and its components?", followed immediately by a Windows Installer dialog that says "Are you sure you want to uninstall the product?". The second one of course refers to the MSI uninstall. Other than this, the uninstall works like a champ.
The only thing I'm not crazy about with this process is that you must install to a directory on the support path, or else add your install directory to the path after installing. This has nothing to do with the MSI, of course (it works great!), but I suspect that if you supply a VLX containing your odcl file and LSP, this problem probably will go away. I'm a newbie and haven't tried it yet.
I posted this because though Barry's tutorial is excellent, about the only thing it's missing is a description of the use of an installer. InnoSetup is free, and not terribly difficult to learn (just what you need, yet another scripting language!). The CADWERX AutoCAD add-on for InnoSetup (I think I got the name right...) takes care of issues relating to AutoCAD versions and support paths, but I chose to write my own with individual selections for different AutoCADs on the same computer. Fortunately this is not needed for a simple OpenDCL installation, though if your AutoLISP is version-specific you might need to deal with it.
If there's any interest, I'll post back with further InnoSetup adventures. Meanwhile, here's my first attempt at an InnoSetup script. You can read it with Notepad.
author=velasquez link=topic=47.msg221#msg221 date=1188654154 wrote:
Hi Owen,
I posted my installation program working with the file msi.
See the file in {2}
I used the command line I only lower to test.
msiexec.exe /passive /i OpenDCL.Runtime.ENU.4.0.3.1.msi
After the installation I didn't get to see different in the windows registry.
I work with Windows XP.
Please tell me what am doing wrong.
He apparently was not able to get his InnoSetup install script working.
I built one yesterday, and it works pretty well.
I was able to install the runtime using the MSI file with MSIEXEC. A big improvement over velasquez's attempt is that the Uninstall process also removes the MSI.
For those interested, the syntax for the MSIEXEC call is sort of convoluted:
Filename: misexec.exe; Parameters: "/i ""{app}\OpenDCL.Runtime.5.1.0.2.msi"""
Filename: misexec.exe; Parameters: "/x ""{app}\OpenDCL.Runtime.5.1.0.2.msi"""
So far I have not been able to get the "/passive" switch to work. The main thing that this does is to eliminate the "Preparing to install..." prompt. I'm guessing that the quotes will also be an obscure structure like the above.
The reason I used the {app} directory for the above is that if you use a {tmp} directory like velasquez did, the uninstall process won't be able to find the uninstall file, and the uninstall of the MSI will fail. The use of {tmp} means that InnoSetup will create its own temporary directory during installation and then delete it, making it unavailable at uninstall time.
During the uninstall, you see the usual "Are you sure you want to remove XXX and its components?", followed immediately by a Windows Installer dialog that says "Are you sure you want to uninstall the product?". The second one of course refers to the MSI uninstall. Other than this, the uninstall works like a champ.
The only thing I'm not crazy about with this process is that you must install to a directory on the support path, or else add your install directory to the path after installing. This has nothing to do with the MSI, of course (it works great!), but I suspect that if you supply a VLX containing your odcl file and LSP, this problem probably will go away. I'm a newbie and haven't tried it yet.
I posted this because though Barry's tutorial is excellent, about the only thing it's missing is a description of the use of an installer. InnoSetup is free, and not terribly difficult to learn (just what you need, yet another scripting language!). The CADWERX AutoCAD add-on for InnoSetup (I think I got the name right...) takes care of issues relating to AutoCAD versions and support paths, but I chose to write my own with individual selections for different AutoCADs on the same computer. Fortunately this is not needed for a simple OpenDCL installation, though if your AutoLISP is version-specific you might need to deal with it.
If there's any interest, I'll post back with further InnoSetup adventures. Meanwhile, here's my first attempt at an InnoSetup script. You can read it with Notepad.