Jump to content


  • 0
Phylum

Post Application Installation Configuations

Question

Super new to SCCM - still trying to figure things out.

 

Nearly all of our applications have post installation steps like applying a registry configuration (via either `regedit /s` or `reg add`), creating directories and/or copying files (license file, configuration file) and so on. Since I've already created a bunch of applications, leveraging SCCM's nifty little feature that grabs all the app info from the MSIs, I'm now looking for how to accomplish 'the next step': applying the proper configurations.

 

What's the best method for applying post application installation configurations?

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Multiple methods... One method is to create the application via the MSI and then afterward change the command line to whatever script you want to run (and does the installation plus the extra actions). Different methods are creating separate deployment types/ packages.

 

First of all thanks for the reply! Sorry for taking a bit of time to respond - I've been quite busy.

 

That was my understanding as well and here's the process I've been following that's resulting in errors in SCCM but *not* in the script [read: batch] file I'm calling:

  1. Build the batch file that calls the installer and does the post installation configuration:
    1. Calls setup file (actual MSI or setup.exe etc) via relative path and any necessary parameters/arguments etc: "%~dp0Full_Installer\setup.exe" /S /v"/qb SERIALNUMBER=12345 /l*vx c:\Logs\ApplicationName.log"

    2. Performs a variety of operations: xcopy /r /y, md/mkdir, reg add/delete, regedit /s; Each operation is redirected to >>!logfile! 2>>&1

  2. Test each batch file the follow this process:
    1. confirm no errors on screen during install
    2. confirm no errors in logs after install
    3. confirm application successfully installed, which means:
      1. checking the location of where the app is expected to install to verify its there and it works
      2. checking that all applicable changes were made successfully
        1. so I'm looking for registry entries, configuration files, directory creation etc - everything in the batch
      3. checking Programs and Features to validate its presence
  3. I repeat this process (all of Step 2 above) for the uninstall batch file to confirm it too completes successfully

With the batch files tested & confirmed working

  1. I create new Application in SCCM
  2. Select Windows Installer (*.msi file)
  3. Choose msi file from \\unc\path\application\fullinstaller\file.msi
  4. Make any necessary adjustments to the General information screen
  5. Close Application Wizard
  6. Edit Properties of newly created Application
  7. Go to Deployment Types tab
  8. Select the MSI entry in there & click Edit
  9. Go to the Content tab & alter directory
    1. During creation its pointed to \\unc\path\application\fullinstaller\file.msi
    2. While not always the case, the batch file actually lives one directory up in \\unc\path\application, so I'm adjusting it to point to that directory. instead
  10. Go to Programs tab
  11. Change Installation program to the batch file: install_myapp.cmd
  12. Change Uninstall program to the batch file: uninstall_myapp.cmd
  13. Click Apply & click OK

Ok, now that all my changes are made, I need to get this into the DP:

  1. I Deploy Content (if I haven't already done so)
    1. Right click on Application > Distribute Content > Add DP > Continue through Wizard
  2. Redistribute Content (especially if edits were made to existing applications)
    1. Right click on Application > Properties > content Locations > Select location > Click Redistribute
  3. Verify deployment/redistribution via Content Status > View Status
  4. Wait a little while (usually just a few minutes <5)

With that now complete, I'm ready to test the install/uninstalls via SCCM. So I go to client workstation, load up Software Center & Locate application & click 'Install', and this is where things get strange.

  • Misreported Failure
  1. It successfully downloads but installation fails with a variety of errors (see below):
    1. Unable to make changes to your software.
      There was a problem applying changes to the software. You can try again. Or, if the problem continues, the information that is shown in the following section can assist your help desk in troubleshooting.
      Click OK to return to Software Center
      More Information
      The software change returned error code 0xVARIES(n).
  2. I check "Program Files (x86)" and I see the program installation directory & its populated with files.
  3. I check "Programs and Features" and I see the application listed. I can uninstall, change & repair.
  4. I restart software center, refresh it a few times and the application is still listed under 'Available Software' and 'Installation Status'.
  5. If I click 'Retry' it immediately disappears from view
    1. What that means is: If I'm looking at 'Available Software' or 'Installation Status', the application vanishes from that 'tab', and appears under 'Installed Software' within 'Software Center'
  6. I reviewed the MSI manually but saw no "return value 3" entries; Passed the same log through WiLogUtil.exe and its not isn't showing any problems either.

So it actually did install successfully, yet something 'failed', or was translated as a failure, causing Software Center to believe the install failed.

  • Outright Failure
  1. With application 'X' installed, from the 'Installed Software' tab I click 'Uninstall' and like before I get an error:
    1. Unable to make changes to your software.
      There was a problem applying changes to the software. You can try again. Or, if the problem continues, the information that is shown in the following section can assist your help desk in troubleshooting.
      Click OK to return to Software Center
      More Information
      The software change returned error code 0xVARIES(n).
  2. I check "Program Files (x86)" and the other tasks - its still installed and everything is still in place.
  3. I don't create uninstall log files so I don't have anything to view, but again: running the uninstall batch file manually results in success.

I'm quite perplexed!

Share this post


Link to post
Share on other sites

  • 0

Just in case this is relevant, here's what the install script looks like:

@echo off
rem cls

echo. & echo Installing FileSite 8.5 SP3 U5
"%~dp0Full_Installer\setup.exe" /S /v"/qb SERIALNUMBER=0004321 /l*vx c:\Logs\Installs\Autonomy-FileSite85SP3U5.log"


echo.     Applying Default User Configurations
echo.          Copying NRTDDE.INI
if not exist "C:\Users\default\AppData\Local\Interwoven\WorkSite" md "C:\Users\default\AppData\Local\Interwoven\WorkSite"
xcopy /r /y "%~dp0NRTDDE.INI" "C:\Users\default\AppData\Local\Interwoven\WorkSite\"


echo.          Disabling QuickView Pane (Default USer^)
if not exist "C:\Users\default\AppData\Local\Interwoven\QuickSearch\Config" mkdir "C:\Users\default\AppData\Local\Interwoven\QuickSearch\Config"
xcopy /r /y "%~dp0MinerSettings.xml" "C:\Users\default\AppData\Local\Interwoven\QuickSearch\Config\"


echo.          Merging FileSite Customizations
reg load HKEY_USERS\DefUser "c:\Users\Default\NTUSER.DAT"
regedit /s "%~dp0BRCoFileSite Customize-defuser.reg"
reg unload HKEY_USERS\DefUser


echo.     Applying Current User Configurations
echo.          Copying NRTDDE.INI
if not exist "%userprofile%\AppData\Local\Interwoven\WorkSite" md "%userprofile%\AppData\Local\Interwoven\WorkSite"
xcopy /r /y "%~dp0NRTDDE.INI" "%userprofile%\AppData\Local\Interwoven\WorkSite\"


echo.          Disabling QuickView Pane
if not exist "%localappdata%\Interwoven\QuickSearch\Config" mkdir "%localappdata%\Interwoven\QuickSearch\Config"
xcopy /r /y "%~dp0MinerSettings.xml" "%localappdata%\Interwoven\QuickSearch\Config\"


echo.          Merging FileSite Customizations
regedit /s "%~dp0BRCoFileSite Customize-hkcu.reg"


echo.     Setting Express Search to Run on Startup
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "WSSearch" /t reg_sz /d "\"C:\Program Files\Interwoven\WorkSite\WESClient.exe\" -background" /f


rem echo.     Copying Customized Views
rem xcopy /r /y "%~dp0Default Views" "C:\Program Files\Interwoven\WorkSite\iOutlook"


rem echo.     Copying Filing Status Icons
rem if not exist "%userprofile%\AppData\Local\iOutlook\Config" md "%userprofile%\AppData\Local\iOutlook\Config"
rem if not exist "C:\Users\Default\AppData\Local\iOutlook\Config" md "C:\Users\Default\AppData\Local\iOutlook\Config"
rem xcopy /r /y "%~dp0DefaultCFG" "%userprofile%\AppData\Local\iOutlook\Config\"
rem xcopy /r /y "%~dp0DefaultCFG" "C:\Users\Default\AppData\Local\iOutlook\Config\"


rem echo. & echo Copying Worksite Macros
rem xcopy /r /Y "C:\Program Files\Interwoven\WorkSite\Macros\imanO2k.dot" "C:\Program Files\Microsoft Office\Office12\Startup\"
rem xcopy /r /Y "C:\Program Files\Interwoven\WorkSite\Macros\imanO2k.xla" "C:\Program Files\Microsoft Office\Office12\xlstart\"


:end

And here's the uninstaller:

@echo off
rem cls

echo. & echo Uninstalling FileSite 8.5 SP3 U5
MsiExec.exe /X{C2B80D37-7690-4172-A5C2-423564CE8616} /qb- /l*vx c:\Logs\Uninstalls\Autonomy-FileSite85SP3U5.log


echo.     Removing Express Search from Startup
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "WSSearch" /f


:worksitemacros
if exist "C:\Program Files\Microsoft Office\Office12\Startup\imano2k.dot" (
	echo.     Removing Worksite Word Macro
	del /q "C:\Program Files\Microsoft Office\Office12\Startup\imano2k.dot"
)
if exist "C:\Program Files\Microsoft Office\Office12\xlstart\imano2k.xla" (
	echo.     Removing Worksite Excel Macro
	del /q "C:\Program Files\Microsoft Office\Office12\xlstart\imano2k.xla"
)


:end

Share this post


Link to post
Share on other sites

  • 0

As I mentioned above, the install & uninstall errors vary:

  • The software change returned error code 0x1(1).
  • The software change returned error code 0x4(4).
  • The software change returned error code 0xFF(255).
  • The software change returned error code 0x87D00213(-2016411117).
  • The software change returned error code 0x87D00325(-2016410843).
  • The software change returned error code 0x87D01107(-2016407289).

Running the batch file to install/uninstall completes without error so either something unexpected is happening that SCCM interprets as an error, or I made a mistake in the way I created the application. I want to believe its something very simple that I'm missing or just not doing right.

 

I'm a big log person. All the batches log each operation and redirects the results (1> and 2>) to a log file for review. It makes it super simple to see where something failed down the road. SCCM includes a wealth of log files for various operations, and, in my humble opinion, its a bit overwhelming!

I know that the client logs are all stored in C:\Windows\CCM\Logs but there are over 100 logs in there and its not inherently obvious which log corresponds to which component of CM. So, all that said, I'm happy to comb through with cmtrace to troubleshoot deeper & get a better understanding of the process, but I'm in need of help finding a good place to start.

  • Is there a resource available that provides a breakdown/definition of each of the logs in C:\Windows\CCM\Logs?
  • What about the logs on the SCCM server itself?

 

 

Thanks again!

Share this post


Link to post
Share on other sites

  • 0

Obligatory bump...

 

Between fires, adhoc projects & tasks, I've been researching and learning more about SCCM. When installing/uninstalling applications, I'm looking at task manager to view the actual command line being run for the install, and in some situations, its incorrect. In other situations the command line is correct, but, the actual install batch file (in c:\windows\ccmcache\random) is not the most recent one and/or its missing additional files that were recently added.

 

Perhaps this is the source of all my problems: The DP is not up to date/doesn't contain the latest changes made to the batch files. (Because remember, as I mentioned above, the install/uninstall batch files currently work without issue when executed manually or via login script deployments.)

 

So maybe my question should be: If the below isn't the proper method for 'refreshing' the DP with the latest application data (updates to the install package, updated files etc), what is the proper method for doing so?

  1. Right click on Application > Deploy Content & complete wizard (if I haven't already done so)
  2. Right click on Application > Properties > Content Locations > Select location > Click Redistribute > Click OK

I hate to be a pain - just in need of some guidance.

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
Answer this question...

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.