none
Create a script to install an Application from SCCM

    Question

  • Hello,

    I am on a mission to install a specific application, let's name it: NOVEMBER, in 200 Servers.  

    So far what I am doing is Login to the Server: run "change user /install" open SCCM, find the application "NOVEMBER", install, wait to be completed, "change user /execute", and that is it...

    We have SCCM team, and I think they can push the application to all the servers, but I need to run the change user /install command before the installation and they cannot do that for me.

    I was hoping to do this using PowerShell, <g class="gr_ gr_729 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="729" id="729">i</g> want to call the application using PowerShell, without opening SCCM, is it possible?

    What I have been doing is the following:  install NOVEMBER, copy the files located in CCMCACHE to a specific location, and run a script to install the MSI file from that particular folder, now the SCCM team mentioned that is not recommended. so... <g class="gr_ gr_1013 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="1013" id="1013">i</g> had to stop doing that.

    Any of you might have another alternative?

    SCCM Client Center 2.0.4.2

    Thank you



    • Edited by mcubac Wednesday, September 12, 2018 1:29 PM
    Wednesday, September 12, 2018 1:21 PM

All replies

  • OK so a couple of things.

    Are you sure you actually NEED to run the change user execute and install commands? If the thing you're installing is an MSI file the Windows Installer will take care of this for you as far as I understand it. I didn't think the change user commands were necessary from Server 2008 onwards (and nothing before that is supported by SCCM as a client anyway). Have you tried installing NOVEMBER without doing it?

    Assuming you do need to do it for some reason I can see at least a couple of ways of going about it.

    Create NOVEMBER as a Package in SCCM not an Application, define the source files to include the files for NOVEMBER plus a batch file which contains the "change user /install" command, then "msiexec /i NOVEMBER.MSI" then "change user /execute".

    Alternatively, create NOVEMBER as an application but rather than just deploy it deploy a Task Sequence with 3 steps. a "Run Command Line" step for install mode, an Install Application step for November and a final "Run Command Line" step for execute mode.

    Wednesday, September 12, 2018 1:57 PM
  • Hi,

    It seems we plan to push applications to RDS server through SCCM. 

    MSI installs DO automatically switch to Install mode when run (even deployed through SCCM). Other types of installs do not. 

    If the application is not in .msi format, we may try Philip's suggestion. In addition, as an alternative, we may try PSAppDeploy below to see if it works.

    PowerShell App Deployment Toolkit 3.7.0
    https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/releases

    Hope the above information helps.

    Regards,

    Alex Zhu
    -----------------------------------------------
    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
    Thursday, September 13, 2018 1:19 AM
  • Thank you both,

    I do not work in the SCCM team, and I asked for that specific thing but they "cannot" do it. 

    So my plan B was... find a way to call the MSI or SCCM Package without actually opening Software Center (SCCM).

    For example: to install the application "November", I need to open Software Center > Click: Find additional Application > an IE11 page will open > I will need to search the application NOVEMBER > Select the application > click INSTALL...   This will move the package to SCCM, and the installation will take place.

    It is not a long process, but when I have to do it on several servers, it is a time-consuming process.  I thought there might be a way how I can call SCCM and execute a package without opening SCCM.

    uhmmmm but the more I search, the more I do not see that is possible.  I think your option: creating another package that includes the 2 commands is the easier solution, but unfortunately, I cannot do it.

    Thank you

    6 hours 17 minutes ago
  • When you deploy applications you can make them available so users can install them from software center.

    Or you can make them required and schedule them to run at a specific time with no user interaction at all.

     

    Richard Knight | Collection Refresh Manager | Automate detection rules for patch \ msp files | Twitter

    4 hours 47 minutes ago