locked
Cannot apply App-V Dynamic User Configuration xml to machine in an SCCM 2012 device collection RRS feed

  • Question

  • Hi,

    I have successfully sequenced an application and added a script to the sequence to migrate external user profile settings into the bubble.  I have updated the <AppName>_UserConfig.xml to launch the script on the startvirtualenvironment process.  When the user launches the shortcut the app loads but the script does not run.  Does SCCM 2012 use the -DynamicUserConfigurationPath option?

    Regards,

    NP



    Wednesday, April 5, 2017 1:31 PM

Answers

  • A couple things... the user config is a subset of the deployment config. Everything the user config XML can do can also be done exactly the same as with the user config. 

    Having a separate / different user config would be used if you wanted a specific group of people to get a different shortcut name, or different script, not if you want EVERYONE to get the same shortcut/script, etc.  I don't know if SCCM even gives you the option of deploying the user config like that anyway.

    Long story short, even if you want to run a user start VE script adding it to the deployment XML works.  Whether or not the package publishes globally or to the user won't matter, it will still execute under the user context when the user initiates the VE.
    Except...enter the backwards world of SCCM!

    SCCM does use the user config XMLs, I know because its a huge PIA.  It means if you wanted to add a startVE script to your deployment XML and you don't also add it to your user config XML SCCM will publish the user config without the startVE script.  To you as the end user it will look like your script is missing.
    To make matters more confusing, this is really the opposite of how the publishing server, and even the powershell commands work. 
    This also means that embedded scripting and manipulating the internal XML isn't optional for SCCM.  If you add a script internally it will be 'lost' through the publishing of the 2 XML files.

    Its a lot of weird caveats to throw at you...the easiest in my opinion to support (when you have to worry about SCCM) is to add all changes to both the deployment XML and the user XML.

    • Marked as answer by trailblazer1 Thursday, April 6, 2017 9:45 AM
    Wednesday, April 5, 2017 5:10 PM

All replies

  • SCCM requires and uses both XMLs in publishing...even if you don't want it to!  If you look in the (I think) appenforce sccm log you will see the exact lines being executed.

    What we ended up doing here is putting everything in the deployment XML and then through a script creating a user config XML with everything from the deployment XML, that way everything is in both (I know the add scripts etc don't apply to the user XML, but everything that is appropriate).

    Not 100% sure if SCCM uses the user XML if publishing globally (to the machine).  We are a user centric App-V group over here. 

    Wednesday, April 5, 2017 3:17 PM
  • I know from the powershell command line that you get an error if you specify userconfig when publishing globally.  Hmmm, and SCCM uses powershell so I suppose you may be correct in thinking that SCCM does not use userconfigs.  Trouble is since I need the script which resides in StartVirtualEnvironment to be in the users context I'm not sure machineconfig will work. 

    Wednesday, April 5, 2017 4:13 PM
  • A couple things... the user config is a subset of the deployment config. Everything the user config XML can do can also be done exactly the same as with the user config. 

    Having a separate / different user config would be used if you wanted a specific group of people to get a different shortcut name, or different script, not if you want EVERYONE to get the same shortcut/script, etc.  I don't know if SCCM even gives you the option of deploying the user config like that anyway.

    Long story short, even if you want to run a user start VE script adding it to the deployment XML works.  Whether or not the package publishes globally or to the user won't matter, it will still execute under the user context when the user initiates the VE.
    Except...enter the backwards world of SCCM!

    SCCM does use the user config XMLs, I know because its a huge PIA.  It means if you wanted to add a startVE script to your deployment XML and you don't also add it to your user config XML SCCM will publish the user config without the startVE script.  To you as the end user it will look like your script is missing.
    To make matters more confusing, this is really the opposite of how the publishing server, and even the powershell commands work. 
    This also means that embedded scripting and manipulating the internal XML isn't optional for SCCM.  If you add a script internally it will be 'lost' through the publishing of the 2 XML files.

    Its a lot of weird caveats to throw at you...the easiest in my opinion to support (when you have to worry about SCCM) is to add all changes to both the deployment XML and the user XML.

    • Marked as answer by trailblazer1 Thursday, April 6, 2017 9:45 AM
    Wednesday, April 5, 2017 5:10 PM
  • If you are targeting for a device collection(Global), SCCM will only use the deployment config file. It won't use the user config file.

    If you are targeting to a user collection, then SCCM will run both the deployment config(while adding) and the user config(while publishing). The entries made in the user config file will win.


    (Please click on Vote as Helpful and/or Mark as Answer, if it has helped you.)

    MVP - Windows and Devices for IT

    app2pack.blogspot.com: app2pack.blogspot.com

    Thursday, April 6, 2017 8:58 AM
  • Hi,

    It does indeed allow a StartVirtualEnvironment  in the machineconfig and it works.  Although I had to select run script outside the virtual environment.  I do not know why that is the case because if I break into the bubble and launch the script in exactly the same way, it works.  Anyhow thanks for the answer.

    NP

    Thursday, April 6, 2017 9:45 AM