Note: This article was originally written on reich-consulting.net. Reich Web Consulting has narrowed its focus to the web and no longer offers tech support services, so we’ve moved all of our tech support content off-site. We hope you find this article useful. It is provided as-is, and we will no longer provide support on this topic.
This post will teach you how to create an unattended installation of EMA OrCAD 16.6. OrCAD’s setup program is built on InstallShield. Normally an InstallShield installation can be automated by recording a manual install to a script file (setup.exe /r /f1 “setup.iss”) and playing it back (setup.exe /s /f1 “setup.iss”), but EMA does things a little bit differently.
Configuring the Installation
If you glance through the Install Guide (which you can download with your OrCAD software) you’ll see that the installation is configured by using a silent installation file called silentinstall-SPB.ini. You can tell setup.exe to use the file by running the command setup.exe !quiet=path_to_silentinstall-SPB.ini. Rather than messing with multiple copies of the file, I just edit the one provided and reference it in my install script. Below is a copy of my own silentinstall-SPB.ini file.
[rc_codebin snippet_id=”5388" language=”ini”]
Scripting a Silent Installation
Unfortunately running OrCAD’s setup application doesn’t quite get the job done. There are a couple of issues I had to work out along the way create a successful, unattended install.
Use the Setup.exe Under the \Disk1 Folder
The main setup.exe opens the interactive menu. When you script your silent installation, you need to call the setup.exe from within the \Disk1 folder, which is actually responsible for installing the applications.
Copy silentinstall-SPB.ini Somewhere “Simple”
When I passed a complicated path to the silentinstall-SPB.ini file, setup didn’t like it. I’m running the entire installation from a UNC path, and when I passed that network path as !quiet=”\\server\share\EMA OrCAD\Disk1\documents\silentinstall-SPB.ini” the installation would stop without error or warning, or any log that I could locate. In my silent install script I got around this problem by copying the file to the system Temp folder (referenced by the %TEMP% environment variable), then referencing it from there.
Make Setup.exe Wait Until the Installation Completes Before it Exits
OrCAD’s setup.exe was created with InstallShield. InstallShield works by using it’s own interface to configure the installation, then spawning a bunch of msiexec processes to actually install the software. The problem is that setup.exe quits before the MSI installations complete, so unless you account for this behavior your silent install script will exit before the installation is actually completed. In most situations this isn’t the behavior your going to want. OrCAD may be one of several applications you want to install in a series. If your OrCAD install script exist before the installation is completed, your next install will probably fail. I account for this behavior by running setup.exe from a new command shell (using cmd /c) and specifying the InstallShield switches /w /clone_wait. The /w switch is supposed to make setup.exe wait until installation is completed, but it doesn’t seem to get the job done itself. The /clone_wait switch tells setup.exe to wait until all of it’s cloned processes (several instances of msiexec) complete. The combination of the two switches finally made my installation work the way it was supposed to.
EMA’s own instructions for unattended installation state that you must manually configure licensing after the installation is completed. That’s, like, the exact opposite of what unattended means. Running the License Configuration Utility just creates an environment variable called CDS_LIC_FILE that points to the license server you should already have in place. We’ll account for this by setting the variable ourselves.
The Final Script
Below is the completed unattended installation script that I’ve created. It accounts for all of the quirky behaviors discussed above, and returned an error code of “0” so it can be used in a chain of installations through products like Microsoft Deployment Toolkit.
[rc_codebin snippet_id=”5392" language=”ini” style=”height: 800px;”]