[MSH] Possible install bug: MSH install always resets ExecutionPolicy

Discussion in 'Scripting' started by Alex K. Angelopoulos [MVP], Apr 6, 2006.

  1. After installing build 7487 I noticed that
    HKLM\SOFTWARE\Microsoft\MSH\1\ShellIds\Microsoft.Management.Automation.msh\ExecutionPolicy
    was reset from RemoteSigned to Restricted.

    Since it appears the whole MSH key is deleted during uninstall, I first
    tried uninstalling again and manually setting the value to RemoteSigned to
    see if it is preserved. The value isn't preserved; it is always overwritten.

    Is the intent that MSH will always delete the key contents and always
    overwrite ExecutionPolicy while installing? It's not a significant issue
    during beta, and I can even see why it may be a valuable possible choice
    during upgrades/reinstalls, but automatically working this way will cause
    potentially significant inconveniences to people using it in the field,
    particularly in WAN support scenarios. Any thoughts on this? Also, are there
    any workarounds that will allow overriding this behavior with a custom
    commandline for the installer? If the intent IS to make this default
    behavior, a simple workaround to force custom upgrade would probably
    mitigate most problems.
     
    Alex K. Angelopoulos [MVP], Apr 6, 2006
    #1
    1. Advertisements

  2. Hi Alex,
    We have discussed allowing configuring ExcutionPolicy during setup but we
    have not had lot of feedback around this. Can you post a bug on it and can
    folks vote on it?

    Abhishek Agrawal [MSFT]
    MSH Team
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Abhishek Agrawal [MSFT], Apr 8, 2006
    #2
    1. Advertisements

  3. Will do, as soon as I figure out how to use the new bugging system. Yes, I'm
    lazy. ;)

    The more I look at this, however, the more I focus on the issue of
    overwriting pre-existing settings. Has that had any separate discussion? It
    looks to me like we have some weird potential issues that are due to the
    nature of typical Windows Installer behavior. This may be worth a separate
    post completely to outline some things after I've looked though the Windows
    Installer documentation some more. :)

     
    Alex K. Angelopoulos [MVP], Apr 8, 2006
    #3
  4. Done; I focused on the issue of ExecutionPolicy reset/loss rather than the
    need for a custom setting.
    MSH Registry Customizations Removed/Overwritten during Uninstall/Reinstall
    https://connect.microsoft.com/feedback/ViewFeedback.aspx?SiteID=99&FeedbackID=60862

     
    Alex K. Angelopoulos [MVP], Apr 8, 2006
    #4
  5. I think I would go for the customizing of the setup,
    as I suppose that V2 does have an Upgrade possibility that reserves
    settings (uninstall not needed) ;-)
    as I do an uninstall I would expect all settings gone.

    but if I deploy MSH, I would might like to customize it, would be a
    stopper if my scripts could not run (to set it) untill this was set.

    Gr /\/\o\/\/
     
    /\\/\\o\\/\\/, Apr 8, 2006
    #5
  6. Perhaps the ExecutionPolicy should be per user instead of machine wide.
    Then it would make more sense to keep the user's current settings. Voted.
     
    Keith Hill [MVP], Apr 9, 2006
    #6
  7. That is exactly the scenario I had in mind. Today if you deploying Msh on a
    new machine, you cannot use it to run scripts till you ran a secondary thing
    to set ExecutionPolicy. We essentially force a post-install step and the
    installer itself seems like a good place to put it.

    Abhishek Agrawal [MSFT]
    MSH Team
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no
    rights.

     
    Abhishek Agrawal [MSFT], Apr 10, 2006
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.