Jump to content


Aurock

Syntax for deploying app with answer file

Recommended Posts

I have some applications which have to be installed with a command line parameter that points to an answer file or config file. Typically, this parameter would include the full path to the required file. For example:

setup.exe /s /path:"c:\temp\config.txt"

To deploy it through config manager, I included the config.txt in the source directory alongside the setup.exe file. I have tried a couple of command line variations for the "Installation Program" in the deployment type for this, but I don't seem to have hit on the right one. What would be the proper syntax to use for installing such a program through configmgr, so that the program's setup routine can locate and access the required config file during installation?

 

Thanks!

Share this post


Link to post
Share on other sites


Hi,

I would put the command in a .cmd file, and use the %~dp0 variable which Points to the current path including a trailing backslash. In your example above putting the below text in a command line should Work fine.

Setup.exe /s /path:"%~dp0config.txt"

It will read the config file from the DP share directly or from the client cache based in your Deployment setting.

 

Regards,
Jörgen

  • Like 1

Share this post


Link to post
Share on other sites

Hmm... I created 'setup.cmd' and put the install command in the cmd file, using the variable as you suggested. I then changed the "Installation Program" to setup.cmd, updated conent for the application, and redistributed the application to the DP. Unfortunately, it's still failing to install, with a return code of -3. However, if I go to the ccmcache directory and manually run the 'setup.cmd' file as administrator, the program installs successfully with a return code of 0.

 

What would cause the installer to return -3 (which appears to mean 'Required data not found in the Setup.iss file') when system center runs it, but not when I run it?

Share this post


Link to post
Share on other sites

Found the solution. I had to add /b"c:\temp\appname" as an additional parameter. It seems that the installer wants to extract things into the user's local appdata directory, and when running from system center it can't do that - or can't get access to read back the files it extracted. By using the /b parameter to direct the extraction of files to a different location, the install now works successfully.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...