Building a MSI
So I have done some reading, and found several helpful links here on itninja... but I still have a question/problem.
I am using Install Shield 2013 to make an MSI. I am using a custom action to make a basic MSI wrapping up a custom exe file. (I wrote a scipt and then converted it to a exe using a program called AutoIT).
I have created the MSI with the CA and everything seems to build correctly. However, when I run it on my test machine the MSI goes through its steps and I can even see the executable launch, However, the commands in the exe don't actually take effect. My exe is set to remove a program via cmd line... I see the cmd shell pop up, but the program does not actually get removed. Simplified: my msi is executing the exe file - but the commands are not actually executing. Does that make sense?
Now... before you ask. Yes, the exe works just fine outside of the MSI. If I just run the exe, without the MSI wrapper, it functions as it should and all is well. But i need the MSI so I can deliver and automated function to my users.
Also, I noticed in Install sheild I set where the "package" is to be delivered to the target machine. If I go to that file path on the target machine, I can drill down and actually find the exe file - so it seems as if the MSI just installed (copied) the desired exe to the C: of the machine - then I (or the user) would have to manually launch the exe. this is not the desired outcome.
Any thoughts as to what I can do differently am doing wrong?
Am I possibly misunderstanding the idea of a CA with a exe, in that it just delivers the exe OR can be used to execute an existing exe on the machine??
My suggestion is
Create your MSI. Create the folder structure you want by creating folders in Files and Folders pane in Installshield. Then add the .exe as a file into the folder.
Set the .exe as the key for the component if it is not already set (right-click, set key file).
This part just installs the file but doesn't run it
Now we make a CA to run the file.
On the Custom actions pane create a new CA. Right-click Custom actions then choose New EXE > Installed with product.
Click on this CA and in the Action page on the right, select your .exe for "Executable Keyfile".
Set return processing to "Synchronous (ignore exit code)"
In-script execution should be "Deferred Execution in System context". This allows it to run with elevated permissions.
In the Install Exec sequence choose "After Install Files"
In the Install Exec Condition type NOT INSTALLED
This means your CA will only run at install time.
Give this a go and see what you get.
I just wanted to responsed to this thread and give an update (and "close" it). While working with some of the guidance provided from here, I was also attempting to work with Flexera support on a solution as well. I was finally able to get a hold of someone with a willingnes to help.
Instead of Install Shield, with a Custom Action, they suggested using Install Sheild and using Install Script. With this solution, I could script my needed executable commands (via CMD line) in the script and then launch msiexec and install my MSi created via AdminStudio.
In the end, I believe this is going to work... I just need to hammer out a few of the little details.