Skip to content

Syntax for deploying app with answer file

Featured Replies

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!

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

  • Author

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?

  • Author

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.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.