I need some assistance in deploying an application via a .cmd file.
We have an application that we install manually via .cmd. There are 3 different batch files depending on the OS. What I am trying to do is create one application with 3 different deployment types. I understand and have already created the different deployment types based on OS. The problem I am having is with the syntax for installing the application.
I've copied the entire directory containing the 3 .cmd files and all of the install files to the primary server. The first line of the .cmd's has something like this:
CD \NBU_7.5\PC_Clnt\x64
Each of the 3 batch files has a different CD line, but they are all in the present working directory (where the batch file lives).
In my earlier attempts (under deployment type > select one > edit > programs > installation program) I just pointed it to the .cmd file. aka, Installation Program: "D:\<folder>\<folder>\script.cmd"
This magically worked for one computer. I have no idea how or why - but it failed for the rest. I have also tried just putting "script.cmd" in the Installation Program then putting the rest of the location under the 'Content' tab (does this accomplish the same thing?)
The latest rabbit hole I am running down has to do with the working directory. Some searching on TechNet suggested that I needed to use %~dp0 to help the batch file find the contents it is looking for. I have tried changing it to run "%~dp0script.cmd" and I have also tried adding %~dp0 to the CD portion of the batch file.
I seem to always get this error (or some version of it). The software change returned error code 0x800705B4(-2147023436).
I hope everything I have provided makes sense... I feel like this should be much easier than I am making it.